Skip to content

Commit

Permalink
🐛 FIX: Raise HTML blocks priority to resolve conflict with headings (#…
Browse files Browse the repository at this point in the history
…158)

Sibling to upstream commit: markdown-it/markdown-it@309c03a
  • Loading branch information
hukkinj1 authored Apr 25, 2021
1 parent b1a74b4 commit 7d44103
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion markdown_it/parser_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
("hr", rules_block.hr, ["paragraph", "reference", "blockquote", "list"]),
("list", rules_block.list_block, ["paragraph", "reference", "blockquote"]),
("reference", rules_block.reference),
("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]),
("heading", rules_block.heading, ["paragraph", "reference", "blockquote"]),
("lheading", rules_block.lheading),
("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]),
("paragraph", rules_block.paragraph),
]

Expand Down
6 changes: 3 additions & 3 deletions markdown_it/port.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- package: markdown-it/markdown-it
version: 12.0.4
commit: cd5296f1e7de2b978526178631859c18bb9d9928
date: Mar 27, 2021
version: 12.0.5
commit: 3740146fc9c92ea15fdc6a358137ec7b68f05f4b
date: Apr 14, 2021
notes:
- Rename variables that use python built-in names, e.g.
- `max` -> `maximum`
Expand Down
4 changes: 2 additions & 2 deletions tests/test_api/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def test_get_rules():
"hr",
"list",
"reference",
"html_block",
"heading",
"lheading",
"html_block",
"paragraph",
],
"inline": [
Expand Down Expand Up @@ -63,9 +63,9 @@ def test_load_presets():
"hr",
"list",
"reference",
"html_block",
"heading",
"lheading",
"html_block",
"paragraph",
],
"inline": [
Expand Down
18 changes: 18 additions & 0 deletions tests/test_port/fixtures/commonmark_extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,21 @@ baz</p>
</blockquote>
</blockquote>
.

Issue #772. Header rule should not interfere with html tags.
.
<!--
==
-->

<pre>
==
</pre>
.
<!--
==
-->
<pre>
==
</pre>
.

0 comments on commit 7d44103

Please sign in to comment.