markdown2typst 0.1.8 → 0.1.9

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.
@@ -13466,8 +13466,12 @@ var markdown2typstLib = (() => {
13466
13466
  // src/parser.ts
13467
13467
  function parseMarkdown(markdown, onError) {
13468
13468
  try {
13469
+ const normalizedMarkdown = markdown.replace(
13470
+ /([^\n])\n(\$\$)/g,
13471
+ "$1\n\n$2"
13472
+ );
13469
13473
  const processor = unified().use(remarkParse).use(remarkFrontmatter, ["yaml"]).use(remarkGfm, { singleTilde: false }).use(remarkMath).use(remarkFixAdjacentMath);
13470
- const parsedTree = processor.parse(markdown);
13474
+ const parsedTree = processor.parse(normalizedMarkdown);
13471
13475
  const tree = processor.runSync(parsedTree);
13472
13476
  return tree;
13473
13477
  } catch (error) {