@ai-matrx/content-ir 0.19.18 → 0.19.20
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/CHANGELOG.md +10 -0
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/source.cjs +13 -2
- package/dist/source.cjs.map +1 -1
- package/dist/source.d.cts +6 -1
- package/dist/source.d.ts +6 -1
- package/dist/source.js +13 -3
- package/dist/source.js.map +1 -1
- package/package.json +1 -1
package/dist/source.cjs
CHANGED
|
@@ -133,7 +133,9 @@ var ALLOWED_RAW_HTML_TAGS = /* @__PURE__ */ new Set([
|
|
|
133
133
|
"colgroup",
|
|
134
134
|
"col",
|
|
135
135
|
"figure",
|
|
136
|
-
"figcaption"
|
|
136
|
+
"figcaption",
|
|
137
|
+
"details",
|
|
138
|
+
"summary"
|
|
137
139
|
]);
|
|
138
140
|
var HTML_BLOCK_LEVEL_TAGS = /* @__PURE__ */ new Set([
|
|
139
141
|
"p",
|
|
@@ -159,7 +161,9 @@ var HTML_BLOCK_LEVEL_TAGS = /* @__PURE__ */ new Set([
|
|
|
159
161
|
"colgroup",
|
|
160
162
|
"col",
|
|
161
163
|
"figure",
|
|
162
|
-
"figcaption"
|
|
164
|
+
"figcaption",
|
|
165
|
+
"details",
|
|
166
|
+
"summary"
|
|
163
167
|
]);
|
|
164
168
|
var SPECIAL_CODE_LANGUAGES = /* @__PURE__ */ new Set([
|
|
165
169
|
"transcript",
|
|
@@ -1035,6 +1039,11 @@ var HTML_BLOCK_NAMES = "address|article|aside|base|basefont|blockquote|body|capt
|
|
|
1035
1039
|
var HTML_BLOCK_TAG = new RegExp(`^</?(?:${HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
|
|
1036
1040
|
var ATTRIBUTE = `\\s+[A-Za-z_:][A-Za-z0-9_.:-]*(?:\\s*=\\s*(?:[^\\s"'=<>\`]+|'[^']*'|"[^"]*"))?`;
|
|
1037
1041
|
var HTML_COMPLETE_TAG = new RegExp(`^(?:<[A-Za-z][A-Za-z0-9-]*(?:${ATTRIBUTE})*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*>)\\s*$`);
|
|
1042
|
+
var STRIPPED_HTML_BLOCK_NAMES = "address|article|aside|base|basefont|body|center|dialog|dir|fieldset|footer|form|frame|frameset|head|header|html|iframe|legend|link|main|menu|menuitem|nav|noframes|optgroup|option|param|search|title|track";
|
|
1043
|
+
var STRIPPED_HTML_BLOCK_TAG = new RegExp(`^</?(?:${STRIPPED_HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
|
|
1044
|
+
function opensStrippedHtmlBlock(trimmed) {
|
|
1045
|
+
return STRIPPED_HTML_BLOCK_TAG.test(trimmed);
|
|
1046
|
+
}
|
|
1038
1047
|
var HTML_BLOCK_NAME_SET = /* @__PURE__ */ new Set([
|
|
1039
1048
|
// Condition 1 (raw text) and condition 6 (block) tag names — CommonMark 0.31.
|
|
1040
1049
|
"script",
|
|
@@ -1152,6 +1161,7 @@ function insideHtmlBlock(lines, index) {
|
|
|
1152
1161
|
continue;
|
|
1153
1162
|
}
|
|
1154
1163
|
paragraph = false;
|
|
1164
|
+
if (opensStrippedHtmlBlock(trimmed)) continue;
|
|
1155
1165
|
open = end && end.test(trimmed.slice(2)) ? void 0 : end;
|
|
1156
1166
|
}
|
|
1157
1167
|
return open !== void 0;
|
|
@@ -2911,6 +2921,7 @@ exports.mapInlineCodeSpans = mapInlineCodeSpans;
|
|
|
2911
2921
|
exports.mapPosition = mapPosition;
|
|
2912
2922
|
exports.mapRange = mapRange;
|
|
2913
2923
|
exports.normalizeLinkLabel = normalizeLinkLabel;
|
|
2924
|
+
exports.opensStrippedHtmlBlock = opensStrippedHtmlBlock;
|
|
2914
2925
|
exports.opensTable = opensTable;
|
|
2915
2926
|
exports.pairDisplayMath = pairDisplayMath;
|
|
2916
2927
|
exports.parseFenceOpener = parseFenceOpener;
|