Skip to content

Add attribute/class #829

Answered by ChristianMurphy
mustafa0x asked this question in Q&A
Aug 30, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Is micromark/remark able to do the following: [hi]{.hello}<span class=hello>hi</span>? Similar to pandoc and markdown-it-attrs.

https://github.com/arobase-che/remark-attr as similar (if not the same) syntax, though it may not work with the latest version of remark arobase-che/remark-attr#22

I saw micromark-extension-directive, but that's mostly useful for adding content, not for semantically marking existing content.

Directives can be used to add content or to annotate existing content.
Using https://github.com/remarkjs/remark-directive along side https://github.com/syntax-tree/unist-util-find-all-before would allow for annotating the node/content before.
They'd be wrapped up in a …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mustafa0x
Comment options

@wooorm
Comment options

@mustafa0x
Comment options

@wooorm
Comment options

Answer selected by mustafa0x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants