-
-
Notifications
You must be signed in to change notification settings - Fork 48
Add support for frontmatter #635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
reword 53d0916 test: Green test without frontmatter
| @@ -0,0 +1,19 @@ | |||
| // import * as assert from "#universal/assert"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how to put it back
|
@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. |
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 |
|
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 |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should enforce formatting of flow style array and dict but it doesn't and I don't know why.
4e259e7 to
21bef49
Compare
|
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
824ae96
Compare
824ae96 to
2d61827
Compare
Inspiration: https://github.com/LukeHagar/prettier-plugin-openapi/tree/b1a2f010724eb0b29d0e02ed56b3e493b4ec1438/src/prettier-markdown