stream-markdown-parser 0.0.89 → 0.0.90

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/index.js CHANGED
@@ -9820,6 +9820,9 @@ function tokenToRaw$1(token) {
9820
9820
  const shape = token;
9821
9821
  return String(shape.raw ?? shape.content ?? shape.markup ?? "");
9822
9822
  }
9823
+ function isNonElementHtmlBlock(content) {
9824
+ return /^\s*<\s*[!?]/.test(content);
9825
+ }
9823
9826
  function buildCommonHtmlTagSet(extraTags) {
9824
9827
  const set = new Set(BASE_COMMON_HTML_TAGS);
9825
9828
  if (extraTags && Array.isArray(extraTags)) for (const t of extraTags) {
@@ -10115,6 +10118,7 @@ function applyFixHtmlInlineTokens(md, options = {}) {
10115
10118
  }
10116
10119
  const rawContent = getHtmlBlockCarrierContent(t);
10117
10120
  if (rawContent) {
10121
+ if (isNonElementHtmlBlock(rawContent)) continue;
10118
10122
  const tag = (rawContent.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1] ?? "").toLowerCase();
10119
10123
  const isClosingTag$1 = /^\s*<\s*\//.test(rawContent);
10120
10124
  if (!tag || !shouldMergeHtmlBlockTag(tag)) continue;