Uh oh!
There was an error while loading. Please reload this page.
Add support for frontmatter - #635
Conversation
reword 53d0916 test: Green test without frontmatter
| @@ -0,0 +1,19 @@ | |||
| // import * as assert from "#universal/assert"; | |||
Uh oh!
There was an error while loading. Please reload this page.
taniki
commented
Jan 14, 2026
@Shinigami92 I am trying to use https://github.com/inogai/prettier/tree/main/src/language-markdown as a reference but the structure seems a bit different from yours. |
Shinigami92
commented
Jan 14, 2026
Yeah, many plugins are fully driven by their own owners like myself. It is fully up to us maintainers how to run our plugins, but we can ship the plugin as officially under the |
taniki
commented
Jan 14, 2026
frontmatter support in markdown, css, and html seems to be done through support of embeds: but I can't find such mecanism in yours. should insert something like inserting a case in the |
Shinigami92
commented
Jan 14, 2026
Yeah... that might be a huge problem, because I implemented plugin-pug when a lot of such things where not available or stable, and then also as pug is a "language" which is very easily written from left to write, top to bottom, it was far more easy to just process the token stream as an array / iterator. You could have a look how embedded js or css is formatted right now as well as some expressions like embedded vue or angular syntax. |
also remove deadcode
There was a problem hiding this comment.
issue (blocking): CLI is telling that these files are not TypeScript files, but JavaScript. You need to use TypeScript.
There was a problem hiding this comment.
That will be too much for me right now. Thanks for the support.
| private async frontmatterFormat(frontmatter: string): Promise<string> { | ||
| const options: Options = { | ||
| parser: 'yaml', | ||
| collectionStyle: 'block', |
There was a problem hiding this comment.
this should enforce formatting of flow style array and dict but it doesn't and I don't know why.
4e259e7 to
21bef49Comparetaniki
commented
Jan 14, 2026
I am hitting a wall here.
All the bricks are in place tho. If someone to take it up from there, it will be great. |
4248b65 to
824ae96Compare824ae96 to
2d61827Compare
Inspiration: https://github.com/LukeHagar/prettier-plugin-openapi/tree/b1a2f010724eb0b29d0e02ed56b3e493b4ec1438/src/prettier-markdown