markdown-codec 11.1.11 → 11.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html/html.cjs +15 -9
- package/dist/html/html.js +15 -9
- package/package.json +1 -1
package/dist/html/html.cjs
CHANGED
|
@@ -89,19 +89,25 @@ const HTML_BLOCK_END_PATTERNS = [
|
|
|
89
89
|
/>/,
|
|
90
90
|
/\]\]>/
|
|
91
91
|
];
|
|
92
|
+
const HTML_BLOCK_RAW_TEXT = 1;
|
|
93
|
+
const HTML_BLOCK_COMMENT = 2;
|
|
94
|
+
const HTML_BLOCK_PROCESSING_INSTRUCTION = 3;
|
|
95
|
+
const HTML_BLOCK_DECLARATION = 4;
|
|
96
|
+
const HTML_BLOCK_CDATA = 5;
|
|
97
|
+
const HTML_BLOCK_KNOWN_TAG = 6;
|
|
98
|
+
const HTML_BLOCK_ANY_COMPLETE_TAG = 7;
|
|
92
99
|
const HTML_BLOCK_TYPES = [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
HTML_BLOCK_RAW_TEXT,
|
|
101
|
+
HTML_BLOCK_COMMENT,
|
|
102
|
+
HTML_BLOCK_PROCESSING_INSTRUCTION,
|
|
103
|
+
HTML_BLOCK_DECLARATION,
|
|
104
|
+
HTML_BLOCK_CDATA,
|
|
105
|
+
HTML_BLOCK_KNOWN_TAG,
|
|
106
|
+
HTML_BLOCK_ANY_COMPLETE_TAG
|
|
100
107
|
];
|
|
101
|
-
const LAST_HTML_BLOCK_TYPE = 7;
|
|
102
108
|
function matchHtmlBlockStart(line, interruptsParagraph) {
|
|
103
109
|
for (const type of HTML_BLOCK_TYPES) {
|
|
104
|
-
if (type ===
|
|
110
|
+
if (type === HTML_BLOCK_ANY_COMPLETE_TAG && interruptsParagraph) continue;
|
|
105
111
|
if (HTML_BLOCK_START_PATTERNS[type]?.test(line) === true) return type;
|
|
106
112
|
}
|
|
107
113
|
}
|
package/dist/html/html.js
CHANGED
|
@@ -88,19 +88,25 @@ const HTML_BLOCK_END_PATTERNS = [
|
|
|
88
88
|
/>/,
|
|
89
89
|
/\]\]>/
|
|
90
90
|
];
|
|
91
|
+
const HTML_BLOCK_RAW_TEXT = 1;
|
|
92
|
+
const HTML_BLOCK_COMMENT = 2;
|
|
93
|
+
const HTML_BLOCK_PROCESSING_INSTRUCTION = 3;
|
|
94
|
+
const HTML_BLOCK_DECLARATION = 4;
|
|
95
|
+
const HTML_BLOCK_CDATA = 5;
|
|
96
|
+
const HTML_BLOCK_KNOWN_TAG = 6;
|
|
97
|
+
const HTML_BLOCK_ANY_COMPLETE_TAG = 7;
|
|
91
98
|
const HTML_BLOCK_TYPES = [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
HTML_BLOCK_RAW_TEXT,
|
|
100
|
+
HTML_BLOCK_COMMENT,
|
|
101
|
+
HTML_BLOCK_PROCESSING_INSTRUCTION,
|
|
102
|
+
HTML_BLOCK_DECLARATION,
|
|
103
|
+
HTML_BLOCK_CDATA,
|
|
104
|
+
HTML_BLOCK_KNOWN_TAG,
|
|
105
|
+
HTML_BLOCK_ANY_COMPLETE_TAG
|
|
99
106
|
];
|
|
100
|
-
const LAST_HTML_BLOCK_TYPE = 7;
|
|
101
107
|
function matchHtmlBlockStart(line, interruptsParagraph) {
|
|
102
108
|
for (const type of HTML_BLOCK_TYPES) {
|
|
103
|
-
if (type ===
|
|
109
|
+
if (type === HTML_BLOCK_ANY_COMPLETE_TAG && interruptsParagraph) continue;
|
|
104
110
|
if (HTML_BLOCK_START_PATTERNS[type]?.test(line) === true) return type;
|
|
105
111
|
}
|
|
106
112
|
}
|