fix: HTML import escapes dollar signs in code (#6638) (#6645)

This commit is contained in:
panos--
2024-03-06 14:00:50 +01:00
committed by GitHub
parent 98eba29cdd
commit dce4fd6adc
3 changed files with 73 additions and 4 deletions

View File

@@ -63,10 +63,6 @@ async function documentImporter({
// to match our hardbreak parser.
text = text.trim().replace(/<br>/gi, "\\n");
// Escape any dollar signs in the text to prevent them being interpreted as
// math blocks
text = text.replace(/\$/g, "\\$");
// Remove any closed and immediately reopened formatting marks
text = text.replace(/\*\*\*\*/gi, "").replace(/____/gi, "");