mirror of
https://github.com/biojppm/rapidyaml.git
synced 2026-01-18 13:31:19 +01:00
re #566: fix emit regression in top level container anchors
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- The emit implementation logic was refactored, and is now significantly cleaner
|
- The emit implementation logic was refactored, and is now significantly cleaner
|
||||||
- Emitted YAML will now have anchors emitted before tags, as is customary ([see example](https://play.yaml.io/main/parser?input=LSAhdGFnICZhbmNob3IgfAogIG5vdGUgaG93IHRoZSBhbmNob3IgY29tZXMKICBmaXJzdCBpbiB0aGUgZXZlbnRz)).
|
- Emitted YAML will now have anchors emitted before tags, as is customary ([see example](https://play.yaml.io/main/parser?input=LSAhdGFnICZhbmNob3IgfAogIG5vdGUgaG93IHRoZSBhbmNob3IgY29tZXMKICBmaXJzdCBpbiB0aGUgZXZlbnRz)).
|
||||||
- Added `ParserOptions` defaulted argument to temp-parser overloads of `parse_{yaml,json}_in_{place,arena}()`
|
- Added `ParserOptions` defaulted argument to temp-parser overloads of `parse_{yaml,json}_in_{place,arena}()`
|
||||||
|
- [PR#567](https://github.com/biojppm/rapidyaml/pull/567) (fixes [#566](https://github.com/biojppm/rapidyaml/issues/566)) fixes a regression from this refactor where top-level container anchors were wrongly emitted in the same line if no style was set on the container.
|
||||||
|
|
||||||
|
|
||||||
### API changes
|
### API changes
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ void Emitter<Writer>::_top_open_entry(id_type node)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_RYML_ASSERT_VISIT_(m_tree->callbacks(), ty.is_container(), m_tree, node);
|
_RYML_ASSERT_VISIT_(m_tree->callbacks(), ty.is_container(), m_tree, node);
|
||||||
if(ty.is_block())
|
if(!ty.is_flow())
|
||||||
_pend_newl();
|
_pend_newl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user