Attributes for spans?
See original GitHub issuePandoc supports the following syntax:
[This is *some text*]{.class key="val"}
It’d be lovely to have that as an option.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (7 by maintainers)
Top Results From Across the Web
HTML span tag - W3Schools
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The...
Read more >The Content Span element - HTML - MDN Web Docs
It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, ...
Read more >HTML span data-* Attribute - Dofactory
The data-* attribute adds custom information to a <span> element. The * part is replaced with a lowercase string, such as data-id, data-cost,...
Read more >HTML span attribute - HTML tutorials - w3resource
The purpose of the HTML span attribute is to specify the how many columns of a given col or colgroup will be affected....
Read more >HTML span Tag - GeeksforGeeks
The span tag is a paired tag means it has both open(<) and closing (>) tags, and it is mandatory to close the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just created https://github.com/mb21/markdown-it-bracketed-spans
Seems to work quite well when used together with
markdown-it-attrs
. But currently, it create a span even on an invalid attribute, e.g.[foo]{ bar
-><span>foo</span> bar
. Thus my question: doesmarkdown-it-attrs
expose a utility function that I can use? Similar to how I usedstate.md.helpers.parseLinkLabel
to parse the first part of the span…?@mb21 Nice work!
This plugin does use the parsed token stream, but you might find
hasDelimiters
in https://github.com/arve0/markdown-it-attrs/blob/master/utils.js useful.