butler54/mdformat-frontmatter

Preserve YAML comments in front matter

Closed this issue · 3 comments

I suggest using ruamel.yaml instead of pyyaml to preserve comments in YAML front matter.

Thanks - I'll have a look at that shortly.

👍 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

Closing this as ruamel.yaml is now being used.