[GH-ISSUE #999] MD037: Do not scan emphasis markers in HTML tags #2436

Closed
opened 2026-03-07 20:07:45 +03:00 by kerem · 0 comments
Owner

Originally created by @PlanMan1717 on GitHub (Oct 11, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/999

Description

This is some code I wrote that overrides some default styling with markdown-preview-enhanced by injecting a <style> tag.

The warning on line 63 is MD033 (no Inline HTML)
The warning on line 65 is MD037 (no space in emphasis)

This error should not be triggered in any HTML tag

image

Affected tags

<pre>
  /* test */
</pre>
<script>
  /* comment */
</script>
<h1>
  /* interesting title name */
</h1>

etc...

Note: this problem does not occur in fenced code blocks of html

\```
<h1>
  /* sorry, the triple grave accents can't be escaped cleanly */
</h1>
\```

My setup

I use VS Code with markdownlint v0.52.0, Markdown Preview Enhanced, Markdown All in One, Markdown Emoji, and Markdown Extended

Originally created by @PlanMan1717 on GitHub (Oct 11, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/999 ## Description This is some code I wrote that overrides some default styling with markdown-preview-enhanced by injecting a `<style>` tag. The warning on line 63 is MD033 (no Inline HTML) The warning on line 65 is MD037 (no space in emphasis) This error should not be triggered in any HTML tag ![image](https://github.com/DavidAnson/markdownlint/assets/51730258/abba1c98-51e2-463c-9eba-2f51cd079d8c) ## Affected tags ``` <pre> /* test */ </pre> ``` ``` <script> /* comment */ </script> ``` ``` <h1> /* interesting title name */ </h1> ``` etc... Note: this problem does not occur in fenced code blocks of html ``` \``` <h1> /* sorry, the triple grave accents can't be escaped cleanly */ </h1> \``` ``` ## My setup I use VS Code with markdownlint v0.52.0, Markdown Preview Enhanced, Markdown All in One, Markdown Emoji, and Markdown Extended
kerem 2026-03-07 20:07:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2436
No description provided.