James Brown
1b50109f7b
Include property nodes in the long key check ( #1140 )
2022-10-04 18:51:53 -05:00
Dr. Andre Vehreschild
13626af92a
Fix escaping anchors in keys ( #1101 )
2022-04-21 08:19:51 -05:00
Dr. Andre Vehreschild
a6db7e32ac
Fix single cr not recognized ( #1094 )
...
Complies with YAML Standard [5.4](https://yaml.org/spec/1.2.2/#54-line-break-characters ) [25] instead of matching `\r` only in combination with `\n`.
2022-03-31 22:16:35 -05:00
theamarin
9ee3928754
Prevent trailing spaces when emitting literal strings ( #1005 )
2021-07-04 22:30:04 -05:00
Chen
98acc5a887
Emit the correct Alias on the key ( #908 ) ( #929 )
2020-07-27 13:49:04 -05:00
Chen
1c9abc8fa4
fix issue743: handle the empty content of flow sep/map correctly during emitting. ( #921 )
...
* fix issue743: handle the empty content of flow sep/map correctly during emitting.
* handle the empty Tag/Anchor properly.
* delete comment
2020-07-24 07:28:40 -05:00
Chen
c2793a36d5
Fix runtime exceptions in Visual Studio environment. ( #926 )
2020-07-23 08:48:20 -05:00
Chen
51ce663085
Handle a key with length over 1024 as a long key. ( #916 )
...
Fixes #501
2020-07-16 09:51:54 -05:00
Oliver Hamlet
c82d3129dd
Add support for JSON-compatible string escapes ( #485 )
...
For completeness I've implemented escaping for characters outside the
basic multilingual plane, but it doesn't get used (as there's no
EscapeAsAsciiJson emitter option implemented).
2020-07-13 21:16:34 -05:00
Chen
6d5cfab5fd
fix bug from issue298:Emitter stylings settings overridden by node settings. ( #915 )
2020-07-06 08:16:38 -05:00
Raffaello Bertini
1c2e767347
Fix YAML::Newline in a sequence or map.
...
Inside of a sequence or map, `YAML::Newline` wouldn't reset the collection state, which would cause behavior like this:
```
nodeA:
k: [{i: 0},
{i:1},
]NodeB:
k: [{i: 0},
{i:1},
]
```
2020-07-01 22:31:51 -05:00
Chen
08aa252611
Support kinds of emitter format-setting for YAML::Null. ( #906 )
...
* Support kinds of emitter format-setting for YAML::Null.
* update the code and test cases
* add the comment //fallthrough
2020-06-28 23:31:53 -05:00
Chen
72fe73a104
fix issue752: generate right long keys ( #879 )
...
* fix issue752: generate right long keys
* Improve the readability of test cases
* update to raw string literal
2020-06-17 00:57:28 -05:00
Chen
33316d531b
Add tests for some interfaces of emitter ( #875 )
2020-05-31 09:16:16 -05:00
Jeppe Blicher Tarp
e0e01d53c2
Make sure output of NaN, Infinity and -Infinity is identical on all platforms ( #717 )
...
Specifically, printing `.nan`, `.inf`, and `-.inf`, respectively, as per the spec section 10.2.1.4.
2019-08-03 21:41:45 -04:00
Simon Gene Gottlieb
abf941b20d
Fix float precision ( #649 )
...
The issue is that numbers like
2.01 or 3.01 can not be precisely represented with binary floating point
numbers.
This replaces all occurrences of 'std::numeric_limits<T>::digits10 + 1' with
'std::numeric_limits<T>::max_digits10'.
Background:
Using 'std::numeric_limits<T>::digits10 + 1' is not precise enough.
Converting a 'float' into a 'string' and back to a 'float' will not always
produce the original 'float' value. To guarantee that the 'string'
representation has sufficient precision the value
'std::numeric_limits<T>::max_digits10' has to be used.
2018-12-21 09:05:19 -05:00
butataatawa
d025040049
Fix input strings with quotes giving "!" tagging artifacts.
2016-12-02 08:58:48 -06:00
Jesse Beder
086fec5c35
Fix formatting when writing \ as a character.
2016-10-11 23:58:03 -05:00
Jesse Beder
36fd93a8d5
Fix formatting when writing " as a character.
2016-01-10 12:08:42 -06:00
Jesse Beder
bc86fd4aec
Force null to be quoted if written as a string
2015-01-24 16:07:10 -06:00
Jesse Beder
570ab9d3fb
Fix unused arg warnings for EmitterStyle
2015-01-24 14:39:17 -06:00
Jesse Beder
ad712c4f2d
Add EmitterStyle, which will allow sequence or map style (i.e., flow or block) to be preserved between parsing and emitting
2015-01-24 12:19:20 -06:00
Jesse Beder
f6a6f46ba4
Move EmitterTests to gtest
2014-03-23 11:49:32 -05:00