Preserve YAML comments in front matter
Closed this issue · 3 comments
hukkin commented
I suggest using ruamel.yaml
instead of pyyaml
to preserve comments in YAML front matter.
butler54 commented
Thanks - I'll have a look at that shortly.
hukkin commented
👍 Btw, the ruamel.yaml API might be a bit more tricky than pyyaml. Here's an example how to use it (from another mdformat plugin) https://github.com/hukkinj1/mdformat-config/blob/228710f370f3a2a3ad019af7242beb71805316ce/mdformat_config/__init__.py#L20
hukkin commented
Closing this as ruamel.yaml is now being used.