* PresentationOptions has gained more fine-tuning options:
* directivesEnd: specifies when `---` is written. ref #135
* containers: specifies whether containers use block or flow style
* suppressAddrs: if set, suppresses output of attributes
* quoting: specifies how strings should be quoted
* condenseFlow: specifies whether flow sequences should be on a
single line
* explicitKeys: specifies whether mapping keys should always have '?'
* PresentationStyle is now a list of presets that set
multiple options in PresentationOptions.
* Does not output trailing spaces anymore. ref #135
* Writes compact notation, i.e. a mapping in a sequence starts on the
line with the sequence's `-`, unless attributes are written
* Added tests for the presenter
* Existing code might change behavior because of whitespace, `---` and
compact notation. The API has been extended so that existing code is
affected as little as possible.
Updated type hinting for YAML 1.2.
* previously outdated regexes from YAML 1.1 were used.
* removed special cases for leading zeros that are not part of YAML 1.2.
* updated literal regexes for infinity, NaN and boolean values.
* added tests for type hinting
Co-authored-by: theamarin <theamarin@thecreation.de>
* added loadFlattened. Fixes#117
* fixed an error where recursive nodes were not loaded
properly into YamlNodes.
* made dump with asNone raise an error when a cycle is
encountered, instead of running into an endless loop.
* added maxLineLength to PresentationOptions. Fixes#119
* write a newline to the end of the document.
required for the output files to be POSIX-compliant text files.
also improves QoL when dumping to stdout.
Sorry that this messes with the style here, but it would be nice to have this syntax removed given how long it's been deprecated (https://github.com/nim-lang/Nim/pull/20199).