stream-markdown-parser 0.0.58-beta.5 → 0.0.58-beta.6

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
@@ -8699,10 +8699,13 @@ function applyMath(md, mathOpts) {
8699
8699
  lastIndex = index;
8700
8700
  lastSearchPos = searchPos;
8701
8701
  }
8702
- if (index > 0) {
8702
+ if (open === "(" && index > 0) {
8703
8703
  let i = index - 1;
8704
8704
  while (i >= 0 && src[i] === " ") i--;
8705
- if (i >= 0 && src[i] === "]") return false;
8705
+ if (i >= 0 && src[i] === "]") {
8706
+ searchPos = index + open.length;
8707
+ continue;
8708
+ }
8706
8709
  }
8707
8710
  const endIdx = findMatchingClose_default(src, index + open.length, open, close);
8708
8711
  if (endIdx === -1) {