Browse Source

Invert order of `CodeMirror.multiplexingMode` arguments so that
double dollars are no longer interpreted as an opening single dollar
followed by a closing single dollar.

Raffaele De Feo 7 years ago
parent
commit
40436acfbc
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/codemirror/src/codemirror-ipythongfm.ts

+ 2 - 3
packages/codemirror/src/codemirror-ipythongfm.ts

@@ -25,13 +25,12 @@ CodeMirror.defineMode('ipythongfm', (config: CodeMirror.EditorConfiguration, mod
   return CodeMirror.multiplexingMode(
     gfmMode,
     {
-      open: '$', close: '$',
+      open: '$$', close: '$$',
       mode: texMode,
       delimStyle: 'delimit'
     },
     {
-      // not sure this works as $$ is interpreted at (opening $, closing $, as defined just above)
-      open: '$$', close: '$$',
+      open: '$', close: '$',
       mode: texMode,
       delimStyle: 'delimit'
     },