Skip to content

Commit

Permalink
Lower priority for ATX headers to resolve conflict with HTML blocks
Browse files Browse the repository at this point in the history
fix #772
  • Loading branch information
rlidwka committed Apr 12, 2021
1 parent cd5296f commit 309c03a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [12.0.5] - WIP
### Fixed
- HTML block tags with `===` inside are no longer incorrectly interpreted as headers, #772.


## [12.0.4] - 2020-12-20
### Fixed
- Fix crash introduced in `12.0.3` when processing strikethrough (`~~`) and similar plugins, #742.
Expand Down
2 changes: 1 addition & 1 deletion lib/parser_block.js
Expand Up @@ -19,9 +19,9 @@ var _rules = [
[ 'hr', require('./rules_block/hr'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
[ 'list', require('./rules_block/list'), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'reference', require('./rules_block/reference') ],
[ 'html_block', require('./rules_block/html_block'), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'heading', require('./rules_block/heading'), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'lheading', require('./rules_block/lheading') ],
[ 'html_block', require('./rules_block/html_block'), [ 'paragraph', 'reference', 'blockquote' ] ],
[ 'paragraph', require('./rules_block/paragraph') ]
];

Expand Down
18 changes: 18 additions & 0 deletions test/fixtures/markdown-it/commonmark_extras.txt
Expand Up @@ -635,3 +635,21 @@ baz</p>
</blockquote>
</blockquote>
.

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

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

0 comments on commit 309c03a

Please sign in to comment.