diff --git a/lib/common/html_blocks.mjs b/lib/common/html_blocks.mjs index b72d152..1e27a7f 100644 --- a/lib/common/html_blocks.mjs +++ b/lib/common/html_blocks.mjs @@ -51,8 +51,8 @@ export default [ 'option', 'p', 'param', + 'search', 'section', - 'source', 'summary', 'table', 'tbody', diff --git a/lib/common/html_re.mjs b/lib/common/html_re.mjs index cb466d8..ccfbf87 100644 --- a/lib/common/html_re.mjs +++ b/lib/common/html_re.mjs @@ -13,9 +13,9 @@ const attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)' const open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>' const close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>' -const comment = '|' +const comment = '' const processing = '<[?][\\s\\S]*?[?]>' -const declaration = ']*>' +const declaration = ']*>' const cdata = '' const HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + diff --git a/lib/common/utils.mjs b/lib/common/utils.mjs index 0fbc183..b78c9b0 100644 --- a/lib/common/utils.mjs +++ b/lib/common/utils.mjs @@ -176,7 +176,7 @@ function isWhiteSpace (code) { // Currently without astral characters support. function isPunctChar (ch) { - return ucmicro.P.test(ch) + return ucmicro.P.test(ch) || ucmicro.S.test(ch) } // Markdown ASCII punctuation characters. diff --git a/package.json b/package.json index 8aeb2df..3be144e 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "linkify-it": "^5.0.0", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", - "uc.micro": "^2.0.0" + "uc.micro": "^2.1.0" }, "devDependencies": { "@rollup/plugin-babel": "^6.0.4", diff --git a/test/fixtures/markdown-it/fatal.txt b/test/fixtures/markdown-it/fatal.txt index dfeeb2e..57e085d 100644 --- a/test/fixtures/markdown-it/fatal.txt +++ b/test/fixtures/markdown-it/fatal.txt @@ -29,7 +29,7 @@ foo .

foo <!— xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ->

-

foo <!------------------------------------------------------------------->

+

foo

.