Skip to content

Commit 7d44103

Browse files
authored
🐛 FIX: Raise HTML blocks priority to resolve conflict with headings (#158)
Sibling to upstream commit: markdown-it/markdown-it@309c03a
1 parent b1a74b4 commit 7d44103

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

markdown_it/parser_block.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
("hr", rules_block.hr, ["paragraph", "reference", "blockquote", "list"]),
2525
("list", rules_block.list_block, ["paragraph", "reference", "blockquote"]),
2626
("reference", rules_block.reference),
27+
("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]),
2728
("heading", rules_block.heading, ["paragraph", "reference", "blockquote"]),
2829
("lheading", rules_block.lheading),
29-
("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]),
3030
("paragraph", rules_block.paragraph),
3131
]
3232

markdown_it/port.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- package: markdown-it/markdown-it
2-
version: 12.0.4
3-
commit: cd5296f1e7de2b978526178631859c18bb9d9928
4-
date: Mar 27, 2021
2+
version: 12.0.5
3+
commit: 3740146fc9c92ea15fdc6a358137ec7b68f05f4b
4+
date: Apr 14, 2021
55
notes:
66
- Rename variables that use python built-in names, e.g.
77
- `max` -> `maximum`

tests/test_api/test_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def test_get_rules():
2323
"hr",
2424
"list",
2525
"reference",
26+
"html_block",
2627
"heading",
2728
"lheading",
28-
"html_block",
2929
"paragraph",
3030
],
3131
"inline": [
@@ -63,9 +63,9 @@ def test_load_presets():
6363
"hr",
6464
"list",
6565
"reference",
66+
"html_block",
6667
"heading",
6768
"lheading",
68-
"html_block",
6969
"paragraph",
7070
],
7171
"inline": [

tests/test_port/fixtures/commonmark_extras.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,3 +629,21 @@ baz</p>
629629
</blockquote>
630630
</blockquote>
631631
.
632+
633+
Issue #772. Header rule should not interfere with html tags.
634+
.
635+
<!--
636+
==
637+
-->
638+
639+
<pre>
640+
==
641+
</pre>
642+
.
643+
<!--
644+
==
645+
-->
646+
<pre>
647+
==
648+
</pre>
649+
.

0 commit comments

Comments
 (0)