Open keithamus opened 9 years ago
I have been working on a collection of packages under the org tap-format as sequels to my few tap-[formatter] modules.
https://github.com/tap-format/parser will be the replacement for this. It's basically done, just needs documentation.
Great work @scottcorgan! Kudos :grinning:. Does that mean that tap-out
is deprecated?
@keithamus it will be deprecated, but not quite yet. Once the tap-format modules are all polished and documented, then I'll put out the deprecation notice. I'll still maintain it, but it will be feature complete. It will just be in maintenance mode.
Summary
A yaml value supposedly can contain newline literals, which should be stripped out as part of the yaml value.
tap-out
crashes if it attempts to parse such a value.So apparently the following is valid:
and should result in the following json:
in fact, on yaml.org within the first few lines it is demonstrated:
It seems to be in YAML 1.2 Example 2.18
Proposal
Currently the parser has a custom YAML parser included, which seemingly does not adhere to the YAML spec. I would suggest instead collecting the lines between
---
and...
and passing them straight into a yaml parser. My suggestion would be to go with js-yaml as it claims to be 1.2 compliant and is actively maintained, has lots of github stars, and nearly 5 million npm downloads a month.