@ai-matrx/content-ir 0.19.18 → 0.19.19

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.19
4
+ ### Unreleased
5
+
6
+ - `/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/`.
7
+
3
8
  ## 0.19.18
4
9
  ### Unreleased
5
10
 
package/dist/index.cjs CHANGED
@@ -6095,6 +6095,11 @@ var HTML_BLOCK_NAMES = "address|article|aside|base|basefont|blockquote|body|capt
6095
6095
  var HTML_BLOCK_TAG = new RegExp(`^</?(?:${HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
6096
6096
  var ATTRIBUTE = `\\s+[A-Za-z_:][A-Za-z0-9_.:-]*(?:\\s*=\\s*(?:[^\\s"'=<>\`]+|'[^']*'|"[^"]*"))?`;
6097
6097
  var HTML_COMPLETE_TAG = new RegExp(`^(?:<[A-Za-z][A-Za-z0-9-]*(?:${ATTRIBUTE})*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*>)\\s*$`);
6098
+ 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";
6099
+ var STRIPPED_HTML_BLOCK_TAG = new RegExp(`^</?(?:${STRIPPED_HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
6100
+ function opensStrippedHtmlBlock(trimmed) {
6101
+ return STRIPPED_HTML_BLOCK_TAG.test(trimmed);
6102
+ }
6098
6103
  var HTML_BLOCK_NAME_SET = /* @__PURE__ */ new Set([
6099
6104
  // Condition 1 (raw text) and condition 6 (block) tag names — CommonMark 0.31.
6100
6105
  "script",
@@ -6212,6 +6217,7 @@ function insideHtmlBlock(lines, index) {
6212
6217
  continue;
6213
6218
  }
6214
6219
  paragraph = false;
6220
+ if (opensStrippedHtmlBlock(trimmed)) continue;
6215
6221
  open = end && end.test(trimmed.slice(2)) ? void 0 : end;
6216
6222
  }
6217
6223
  return open !== void 0;
@@ -8060,6 +8066,7 @@ exports.nounFamily = nounFamily;
8060
8066
  exports.nounLabel = nounLabel;
8061
8067
  exports.nounTitleColumn = nounTitleColumn;
8062
8068
  exports.openParseSession = openParseSession;
8069
+ exports.opensStrippedHtmlBlock = opensStrippedHtmlBlock;
8063
8070
  exports.opensTable = opensTable;
8064
8071
  exports.pairDisplayMath = pairDisplayMath;
8065
8072
  exports.parseDirectiveSlug = parseDirectiveSlug;