[GH-ISSUE #1268] MD018 error for ID selectors in inline CSS #2502

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

Originally created by @xuhdev on GitHub (Jun 22, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1268

# Test

<div id="my-table">
<style>
#my-table table {
    width: 100%;
}
</style>

|                                  | A          |    B             |
| -------------------------------- | :--------: | :--------------: |
|                                  |  C         |   D              |

</div>

This generates the error:

markdownlint-cli2 v0.13.0 (markdownlint v0.34.0)
Finding: a.md
Linting: 1 file(s)
Summary: 1 error(s)
a.md:5:1 MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#my-table table {"]
Originally created by @xuhdev on GitHub (Jun 22, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1268 ```markdown # Test <div id="my-table"> <style> #my-table table { width: 100%; } </style> | | A | B | | -------------------------------- | :--------: | :--------------: | | | C | D | </div> ``` This generates the error: ``` markdownlint-cli2 v0.13.0 (markdownlint v0.34.0) Finding: a.md Linting: 1 file(s) Summary: 1 error(s) a.md:5:1 MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#my-table table {"] ```
kerem 2026-03-07 20:08:21 +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#2502
No description provided.