unable to add attribute on <p> within list
See original GitHub issueThis is an issue template. Fill in your problem description here, replacing this text. Below you should include examples.
Markdown-it versions:
% npm ls | grep markdown-it
├─┬ markdown-it@12.0.6
├── markdown-it-attrs@4.0.0
├── markdown-it-deflist@2.1.0
├── markdown-it-footnote@3.0.3
Example input:
1. List item normal text.
List item additional paragraph that wants to have class "tip"
{: .tip}
Current output:
<ol class="tip">
<li>
<p>List item normal text.</p>
<p>List item additional paragraph that wants to have class "tip"</p>
</li>
</ol>
Expected output:
<ol>
<li>
<p>List item normal text.</p>
<p class="tip">List item additional paragraph that wants to have class "tip"</p>
</li>
</ol>
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Why can't the <p> tag contain a <div> tag inside it?
It specifies which elements are block elements and which are inline. For those lists, search for the section marked "HTML content models". For ......
Read more >Solved: Add Attributes to a field - ServiceNow Community
Solved: I am trying to add an attribute 'show_all_tables' to Document ... you are trying to add this as row in the attributes...
Read more >HTML attribute reference - HTML: HyperText Markup Language
Attribute Name Elements Description
accept‑charset List of supported charsets.
align, , , , , , , , , , , , , Specifies the horizontal...
Read more >HTML Standard
HTML has a wide array of extensibility mechanisms that can be used for adding semantics in a safe manner: Authors can use the...
Read more >CSS Selectors
So far, we have only been able to select every instance of a particular tag in our stylesheets. This is often very useful,...
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
We’ve made an adaptation for this in our fork. Since it sounds like it’s not a change you’re considering for the main repo I’ll close the Issue.
I see. At glance, that seems like a breaking change. As I “just” maintain this library, not an active user anymore, I’m not motivated to do such changes.
If you like, you can hire me to create a fork or configuration option for syntax like that.
I’m leaving for vacation tomorrow, so will be away from computer the next weeks.