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.

MD033 allowed_elements highlights the wrong element in mixed element scenarios

See original GitHub issue

In VS Code, the markdownlint allowed_elements setting works for other html elements that I have tried, but not <details>. For example, with the following there are no warnings for h1 or p (as expected), but details still gets a warning :

"markdownlint.config": {
    "MD013": false,
    "no-inline-html": {
        "allowed_elements": [ "details", "h1", "p" ]
    }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
DavidAnsoncommented, Apr 23, 2019

Creating an empty directory with the following Markdown file in it, opening the folder in VS Code with the markdownlint extension, and viewing the file reports MD033 violations for both instances of p and details as expected:

179.md

# 179

Text

<p>html</p>

Text <p>html</p> text

Text

<details>html</details>

Text <details>html</details> text

Adding the following configuration file to that directory suppresses those violations as expected:

.markdownlint.json

{
  "no-inline-html": {
    "allowed_elements": [ "details", "p" ]
  }
}

Could you please provide an example file/scenario where this does not work for you?

1reaction
serotta58commented, Apr 23, 2019

The problem seems to be with

with an embedded tag. If you paste the following line into your code it will incorrectly warn about the
:

Short versionLonger version with more detail
Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow some HTML elements in markdown lint rule MD033 in ...
When authoring Markdown in Visual Studio Code with the markdownlint extension installed, I am seeing lint message MD033/no-inline-html: ...
Read more >
Untitled
Examples sea sponges, Jorge doimeadios, Drama lakonan rosley idris, Weapon app pc, ... Greek punk mix, Common kingdom remix mp3, Mishima technique pottery, ......
Read more >
FEDERAL REGISTER - GovInfo
The FEDERAL REGISTER (ISSN 0097–6326) is published daily,. Monday through Friday, except official holidays, by the Office.
Read more >
Inline elements - HTML: HyperText Markup Language | MDN
In this article, we'll examine HTML inline-level elements and how they ... following paragraph is a <p class="highlight">block-level element ...
Read more >
Log | Future of Coding
For all it's faults, the internet has allowed us all to find each other ... I don't mind that the GUI elements are...
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