mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
fix(editor): scope currency escape recovery to escaped source
This commit is contained in:
@@ -260,9 +260,11 @@ export function preserveLiteralMarkdownSource(
|
||||
if (isPlainEscapedBlock && !info.inTableCell) {
|
||||
result = result.replace(/\\\$(?=\d)/g, '$')
|
||||
}
|
||||
result = info.inTableCell
|
||||
? result.replace(/(?<!\\)\$(?=\d)/g, '\\$&')
|
||||
: result.replace(/(?<!\\)\$(?=\d,)/g, '\\$&')
|
||||
if (preservesEscapedCharacters) {
|
||||
result = info.inTableCell
|
||||
? result.replace(/(?<!\\)\$(?=\d)/g, '\\$&')
|
||||
: result.replace(/(?<!\\)\$(?=\d,)/g, '\\$&')
|
||||
}
|
||||
if (preservesEscapedCharacters && !blockHasInlineMath(info.block)) {
|
||||
result = result.replace(/\$(?!\d)/g, '\\$&')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user