Skip to content

Commit ec52728

Browse files
authored
Merge pull request #152 from neoragex2002/PR
feat(parser): robust backticks, literal markup in link labels, scoped link fallback, stricter math-like
2 parents db6308e + 5ecbcf6 commit ec52728

File tree

11 files changed

+336
-96
lines changed

11 files changed

+336
-96
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
},
116116
"dependencies": {
117117
"@floating-ui/dom": "^1.7.4",
118-
"stream-markdown-parser": "workspace:*"
118+
"stream-markdown-parser": "workspace:^"
119119
},
120120
"devDependencies": {
121121
"@antfu/eslint-config": "^5.4.1",

packages/markdown-parser/src/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ export interface MathOptions {
1212
commands?: readonly string[]
1313
/** Whether to escape standalone '!' (default: true). */
1414
escapeExclamation?: boolean
15+
/**
16+
* Strict delimiter mode.
17+
* - When true, only explicit TeX delimiters are recognized as math:
18+
* inline: `$...$` and `\(...\)`; block: `$$...$$` and `\[...\]`.
19+
* - Heuristics and mid-state (unclosed) math detection are disabled.
20+
*/
21+
strictDelimiters?: boolean
1522
}
1623

1724
let defaultMathOptions: MathOptions | undefined

0 commit comments

Comments
 (0)