diff --git a/CHANGELOG.md b/CHANGELOG.md index 0240c6a..ca95c58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/common/html_re.js b/lib/common/html_re.js index 4fd9369..df81906 100644 --- a/lib/common/html_re.js +++ b/lib/common/html_re.js @@ -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 = ']*>'; var cdata = ''; diff --git a/test/fixtures/markdown-it/commonmark_extras.txt b/test/fixtures/markdown-it/commonmark_extras.txt index 56b4a31..8e34e58 100644 --- a/test/fixtures/markdown-it/commonmark_extras.txt +++ b/test/fixtures/markdown-it/commonmark_extras.txt @@ -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 +?> +. +
a +?>
+. + + Coverage. Directive can terminate paragraph. . a