MDS041: no-inline-html
Raw HTML tags in Markdown are not allowed; use a Markdown construct or an mdsmith directive instead.
# Config
Enable with default settings (empty allowlist, comments permitted):
rules:
no-inline-html: trueEnable with specific tags allowed:
rules:
no-inline-html:
allow: [kbd, sub, sup]
allow-comments: trueDisable:
rules:
no-inline-html: false# Settings
| Setting | Type | Default | Description |
|---|---|---|---|
allow | list of strings | [] | Tag names that are permitted (replaces, not appended). |
allow-comments | bool | true | Whether HTML comments (<!-- ... -->) are allowed. |
# Examples
# Bad
# Title
text <span>x</span> text# Good
# Title
Press <kbd>Enter</kbd> to continue.# What is not flagged
- Fenced and indented code blocks containing HTML
- Inline code spans
- Autolinks (
<https://example.com>) - mdsmith directives (
<?name ... ?>) — block forms are parsed asProcessingInstructionnodes; inline forms are skipped because they start with<? - HTML entities in text (
&,—) - Closing tags (
</div>) — the matching opening tag already produced a diagnostic