Skip to content

Commit a4dc99c

Browse files
committed
fix: MD033 should ignore indented HTML (CommonMark code blocks)
- Add check to skip lines with 4+ spaces or tab indentation - These are treated as code blocks per CommonMark spec - Fixes regression where indented HTML was being flagged after MD046 fix - All MD033 tests now pass
1 parent ad862df commit a4dc99c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/rules/md033_no_inline_html.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ impl Rule for MD033NoInlineHtml {
299299
if structure.is_in_code_block(line_num) {
300300
continue;
301301
}
302+
// Skip lines that are indented code blocks (4+ spaces or tab) per CommonMark spec
303+
// Even if they're not in the structure's code blocks (e.g., HTML blocks)
304+
if line.starts_with(" ") || line.starts_with('\t') {
305+
continue;
306+
}
302307

303308
// Find all HTML tags in the line using regex
304309
for tag_match in HTML_TAG_FINDER.find_iter(line) {

0 commit comments

Comments
 (0)