1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Desktop: Bring editor katex highlight in line with renderer (#4632)

This commit is contained in:
Caleb John 2021-03-11 07:37:58 -07:00 committed by GitHub
parent 4d0beb6d47
commit 6496172aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,8 @@ export default function useJoplinMode(CodeMirror: any) {
const markdownMode = CodeMirror.getMode(config, markdownConfig);
const stex = CodeMirror.getMode(config, { name: 'stex', inMathMode: true });
const inlineKatexOpenRE = /(?<!\S)\$(?=[^\s$].*?[^\\\s$]\$(?![^\s!"#%&'()*+,\-.:;<=>?@[\]^_`{|}~]))/;
const inlineKatexCloseRE = /(?<![\\\s$])\$(?![^\s!"#%&'()*+,\-.:;<=>?@[\]^_`{|}~])/;
const inlineKatexOpenRE = /(?<!\\)\$(?=[^\s$].*?[^\\\s$]\$(?![0-9]))/;
const inlineKatexCloseRE = /(?<![\\\s$])\$(?![0-9])/;
const blockKatexOpenRE = /(?<!\S)\$\$/;
const blockKatexCloseRE = /(?<![\\\s])\$\$/;