gucong3000 / postcss-markdown

PostCSS Syntax for parsing Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why PostCSS

henryruhs opened this issue · comments

Hello,

do I understand this correct that you are creating markdown here? So from my understanding, this should be a PostHTML plugin and not PostCSS?

The main use case of this plugin is apply PostCSS transformations to CSS (and CSS-like) code blocks in markdown file.

I'm sorry, the document hasn't been updated, and a new version will be released by this weekend.

Then it should be a PostHTML plugin that is named markdown-css-autoprefix or something. It actually does not matter that you add CSS related content. What matters is that you are manipulating HTML like files and not CSS files.

Same for your other project here on GitHub that seems to be the base of this one.

This is just my opinion according to the separation of concerns pattern.

It is is parser & stringifier for PostCSS to parsing CSS code blocks in *.md, It is about CSS, not HTML.
AST of PostHTML not work with CSS. PostHTML will catch CSS just as a string.

main useage for this plugin is let stylelint check CSS blocks. stylelint/stylelint#3261

It is not work for run time, It is work for static code lint and fix.

Okay, thank you for the explanation.