question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attributes for spans?

See original GitHub issue

Pandoc supports the following syntax:

[This is *some text*]{.class key="val"}

It’d be lovely to have that as an option.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
mb21commented, Nov 21, 2018

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: does markdown-it-attrs expose a utility function that I can use? Similar to how I used state.md.helpers.parseLinkLabelto parse the first part of the span…?

1reaction
arve0commented, Nov 29, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found