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.

unable to add attribute on <p> within list

See original GitHub issue

This 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 &quot;tip&quot;</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 &quot;tip&quot;</p>
  </li>
</ol>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
grant-gcommented, Aug 18, 2021

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.

0reactions
arve0commented, Jul 17, 2021

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.

Read more comments on GitHub >

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

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