diff --git a/workspace/marqua/src/artisan/marker.js b/workspace/marqua/src/artisan/marker.js index e81a588..210c132 100644 --- a/workspace/marqua/src/artisan/marker.js +++ b/workspace/marqua/src/artisan/marker.js @@ -29,7 +29,7 @@ marker.renderer.rules.heading_open = scope(() => { const [token, text] = [tokens[idx], tokens[idx + 1].content]; const level = +token.tag.slice(-1); if (level > 4) return `<${token.tag}>`; - const [delimited] = text.match(/\$\(.*\)/) || ['']; + const [delimited] = text.match(/\$\(.*?\)/) || ['']; const id = generate.id(delimited.slice(2, -1) || text); if (level === 2) parents = [id]; diff --git a/workspace/marqua/src/core/index.js b/workspace/marqua/src/core/index.js index b939aaa..0c1b609 100644 --- a/workspace/marqua/src/core/index.js +++ b/workspace/marqua/src/core/index.js @@ -34,7 +34,7 @@ export function parse(source) { if (!match) continue; const [, hashes, title] = match; - const [delimited] = title.match(/\$\(.*\)/) || ['']; + const [delimited] = title.match(/\$\(.*?\)/) || ['']; table.push({ id: generate.id(delimited.slice(2, -1) || title),