@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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.20
4
+ ### Unreleased
5
+
6
+ - `/source` **The tokenizer's raw-HTML allow-list is the renderer's list** (verify-RC-B4 round 16): `ALLOWED_RAW_HTML_TAGS` (and `HTML_BLOCK_LEVEL_TAGS`) gain `details` and `summary`, which the screen's `rehypeSafeRawHtml` renders — a line-leading `<details>` is now an `html_block` island like `<table>`, not an inline `xml_tag`. Pinned by a shared vector: the list must equal the frontend-generated `rawHtmlTags` in `gfm-table-vectors.json` (content-ir and both Python twins). Island vectors: 1 of 896 changed; Python fixture copied.
7
+
8
+ ## 0.19.19
9
+ ### Unreleased
10
+
11
+ - `/source` **THE ONE DELIBERATE GFM DEVIATION** (verify-RC-B4 round 16 ruling: content never silently disappears): a line opening an HTML block whose element every sanitizer strips — `STRIPPED_HTML_BLOCK_NAMES` (`link`, `nav`, `header`, `footer`, `article`, `aside`, `main`, `form`, `iframe`, `title`, … the type-6 names neither the screen's raw-HTML allow-list nor print's GitHub schema keeps) — ends that block at its own line, so a table or list under it is read as markdown (`insideHtmlBlock`; new `opensStrippedHtmlBlock(trimmed)`). GFM keeps such lines as raw HTML the sanitizer then empties; a stored answer quoting `<link rel="canonical" …/>` above its content lost every list that way. Python twin moved; `tableStarts` vectors +4 (the frontend's GFM judge applies the deviation). Documented in FEATURE.md § `source/`.
12
+
3
13
  ## 0.19.18
4
14
  ### Unreleased
5
15
 
package/dist/index.cjs CHANGED
@@ -5193,7 +5193,9 @@ var ALLOWED_RAW_HTML_TAGS = /* @__PURE__ */ new Set([
5193
5193
  "colgroup",
5194
5194
  "col",
5195
5195
  "figure",
5196
- "figcaption"
5196
+ "figcaption",
5197
+ "details",
5198
+ "summary"
5197
5199
  ]);
5198
5200
  var HTML_BLOCK_LEVEL_TAGS = /* @__PURE__ */ new Set([
5199
5201
  "p",
@@ -5219,7 +5221,9 @@ var HTML_BLOCK_LEVEL_TAGS = /* @__PURE__ */ new Set([
5219
5221
  "colgroup",
5220
5222
  "col",
5221
5223
  "figure",
5222
- "figcaption"
5224
+ "figcaption",
5225
+ "details",
5226
+ "summary"
5223
5227
  ]);
5224
5228
  var SPECIAL_CODE_LANGUAGES = /* @__PURE__ */ new Set([
5225
5229
  "transcript",
@@ -6095,6 +6099,11 @@ var HTML_BLOCK_NAMES = "address|article|aside|base|basefont|blockquote|body|capt
6095
6099
  var HTML_BLOCK_TAG = new RegExp(`^</?(?:${HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
6096
6100
  var ATTRIBUTE = `\\s+[A-Za-z_:][A-Za-z0-9_.:-]*(?:\\s*=\\s*(?:[^\\s"'=<>\`]+|'[^']*'|"[^"]*"))?`;
6097
6101
  var HTML_COMPLETE_TAG = new RegExp(`^(?:<[A-Za-z][A-Za-z0-9-]*(?:${ATTRIBUTE})*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*>)\\s*$`);
6102
+ 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";
6103
+ var STRIPPED_HTML_BLOCK_TAG = new RegExp(`^</?(?:${STRIPPED_HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
6104
+ function opensStrippedHtmlBlock(trimmed) {
6105
+ return STRIPPED_HTML_BLOCK_TAG.test(trimmed);
6106
+ }
6098
6107
  var HTML_BLOCK_NAME_SET = /* @__PURE__ */ new Set([
6099
6108
  // Condition 1 (raw text) and condition 6 (block) tag names — CommonMark 0.31.
6100
6109
  "script",
@@ -6212,6 +6221,7 @@ function insideHtmlBlock(lines, index) {
6212
6221
  continue;
6213
6222
  }
6214
6223
  paragraph = false;
6224
+ if (opensStrippedHtmlBlock(trimmed)) continue;
6215
6225
  open = end && end.test(trimmed.slice(2)) ? void 0 : end;
6216
6226
  }
6217
6227
  return open !== void 0;
@@ -8060,6 +8070,7 @@ exports.nounFamily = nounFamily;
8060
8070
  exports.nounLabel = nounLabel;
8061
8071
  exports.nounTitleColumn = nounTitleColumn;
8062
8072
  exports.openParseSession = openParseSession;
8073
+ exports.opensStrippedHtmlBlock = opensStrippedHtmlBlock;
8063
8074
  exports.opensTable = opensTable;
8064
8075
  exports.pairDisplayMath = pairDisplayMath;
8065
8076
  exports.parseDirectiveSlug = parseDirectiveSlug;