Skip to content

Commit

Permalink
Allow EOL in processing instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Nov 25, 2020
1 parent e729b90 commit 8ad16ac
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `[](url\ xxx)` is no longer a valid link.
- Fix performance issues when parsing links (#732, #734), backticks, (#733, #736),
emphases (#735), and autolinks (#737).
- Allow newline in `<? ... ?>` in an inline context.


## [12.0.2] - 2020-10-23
Expand Down
2 changes: 1 addition & 1 deletion lib/common/html_re.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';

var close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
var comment = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
var processing = '<[?].*?[?]>';
var processing = '<[?][\\s\\S]*?[?]>';
var declaration = '<![A-Z]+\\s+[^>]*>';
var cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';

Expand Down
10 changes: 10 additions & 0 deletions test/fixtures/markdown-it/commonmark_extras.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,16 @@ Escaped space is not allowed in link destination, commonmark/CommonMark#493.
.


Allow EOL in processing instructions, commonmark/commonmark.js#196.
.
a <?
?>
.
<p>a <?
?></p>
.


Coverage. Directive can terminate paragraph.
.
a
Expand Down

0 comments on commit 8ad16ac

Please sign in to comment.