diff --git a/services/web/frontend/js/features/source-editor/extensions/visual/visual-widgets/character.ts b/services/web/frontend/js/features/source-editor/extensions/visual/visual-widgets/character.ts index 3ada6b75ed..6169c01b25 100644 --- a/services/web/frontend/js/features/source-editor/extensions/visual/visual-widgets/character.ts +++ b/services/web/frontend/js/features/source-editor/extensions/visual/visual-widgets/character.ts @@ -35,6 +35,7 @@ const SUBSTITUTIONS = new Map([ ['\\&', '\u0026'], ['\\#', '\u0023'], ['\\{', '\u007B'], + ['\\$', '\u0024'], ['\\textasciicircum', '\u005E'], ['\\textless', '\u003C'], ['\\textasciitilde', '\u007E'], diff --git a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx index 6228d1f2b5..163e8d4114 100644 --- a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx +++ b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx @@ -626,6 +626,12 @@ describe(' in Visual mode', function () { cy.get('@first-line').should('have.text', 'Test~test') }) + it('decorates a backslash-prefixed dollar sign with a dollar sign', function () { + cy.get('@first-line').type('\\$5.00') + cy.get('@first-line').should('have.text', '$5.00') + cy.get('.ol-cm-character').should('have.length', 1) + }) + it('decorates line breaks', function () { cy.get('@first-line').type('Test \\\\ test') cy.get('@second-line').click()