prettier / yaml-unist-parser

A YAML parser that produces output compatible with unist
MIT License
25 stars 9 forks source link

yaml-unist-stringify? #122

Open cherue opened 5 years ago

cherue commented 5 years ago

Any plans to implement stringify? This would make it a full unified processor :innocent:

ikatyang commented 5 years ago

No plan at the moment, I'll see if I have time to implement it.

(I've implemented a YAML printer in Prettier, though it requires original text to have better formatting, which does not seem to suit your use case.)

cherue commented 5 years ago

Would you be willing to review and merge a PR that implements a stringify function?

If yes is there anything I should be aware of before I start?

ikatyang commented 5 years ago

👍 PRs are always very welcomed. The only thing you need to be noticed is that we need to parse -> stringify -> parse to ensure the AST won't be changed (excluding the position information).