mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 11:43:26 +00:00
[visual] Decorate backslash-prefixed dollar sign (#14552)
GitOrigin-RevId: 3d846eeb1a25051b794a3673e9f48ac7fe4b2cbf
This commit is contained in:
parent
7004b5bacf
commit
a0347c53f0
2 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,7 @@ const SUBSTITUTIONS = new Map([
|
|||
['\\&', '\u0026'],
|
||||
['\\#', '\u0023'],
|
||||
['\\{', '\u007B'],
|
||||
['\\$', '\u0024'],
|
||||
['\\textasciicircum', '\u005E'],
|
||||
['\\textless', '\u003C'],
|
||||
['\\textasciitilde', '\u007E'],
|
||||
|
|
|
@ -626,6 +626,12 @@ describe('<CodeMirrorEditor/> 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()
|
||||
|
|
Loading…
Reference in a new issue