1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Desktop: Fixes #9593: Rich Text Editor: Fix including $s creates math blocks on save (#12398)

This commit is contained in:
Henry Heino
2025-06-06 02:35:03 -07:00
committed by GitHub
parent ab95d728d9
commit 961349c1f3
3 changed files with 4 additions and 1 deletions

View File

@@ -0,0 +1 @@
<p>Some **format** characters $need$ to be `escaped`, if the characters were included directly in HTML.</p>

View File

@@ -0,0 +1 @@
Some \*\*format\*\* characters \$need\$ to be \`escaped\`, if the characters were included directly in HTML.

View File

@@ -18,7 +18,8 @@ var escapes = [
[/^>/g, '\\>'],
// A list of valid \p values can be found here: https://unicode.org/reports/tr44/#GC_Values_Table
[/(^|\p{Punctuation}|\p{Separator}|\p{Symbol})_(\P{Separator})/ug, '$1\\_$2'],
[/^(\d+)\. /g, '$1\\. ']
[/^(\d+)\. /g, '$1\\. '],
[/\$/g, '\\$$'], // Math
]
export default function TurndownService (options) {