plugin-pug icon indicating copy to clipboard operation
plugin-pug copied to clipboard

Add support for frontmatter

Open jlangeveld opened this issue 3 years ago • 2 comments

Closes #389

First round - yaml frontmatter is being parsed en re-inserted. Graymatter supports json out of the box, so I want to work that in too...

jlangeveld avatar Jun 09 '22 13:06 jlangeveld

Maybe copy this https://github.com/prettier/prettier/blob/f2244bdc8621c0a001e3717f595bc8fd8653cce7/src/utils/front-matter/parse.js#L50? Or should Prettier expose it?

fisker avatar Aug 18 '22 05:08 fisker

Maybe copy this https://github.com/prettier/prettier/blob/f2244bdc8621c0a001e3717f595bc8fd8653cce7/src/utils/front-matter/parse.js#L50? Or should Prettier expose it?

Sorry for being off the radar, got a bit swamped... I figured this as a better idea too. At first just copy it, but ask prettier to expose it.

However, I got hung up trying to convince typescript to accept this javascript code without erorring out on missing type declarations. Got any tips about that?

jlangeveld avatar Sep 03 '22 09:09 jlangeveld