Fixed math block delimiter in section parser extension
This commit is contained in:
parent
7c0e6f74e7
commit
93772da821
@ -25,11 +25,11 @@ define([
|
|||||||
}
|
}
|
||||||
if(mathJax.config.enabled) {
|
if(mathJax.config.enabled) {
|
||||||
// Math delimiter has to follow 1 empty line to be considered as a section delimiter
|
// Math delimiter has to follow 1 empty line to be considered as a section delimiter
|
||||||
regexp = '^[ \\t]*\\n[ \\t]*\\$\\$[\\s\\S]*?\\$\\$|' + regexp; // $$ math delimiters
|
regexp = '^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|' + regexp; // $$ math block delimiters
|
||||||
regexp = '^[ \\t]*\\n[ \\t]*\\\\\\\\[[\\s\\S]*?\\\\\\\\]|' + regexp; // \\[ \\] math delimiters
|
regexp = '^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|' + regexp; // \\[ \\] math block delimiters
|
||||||
regexp = '^[ \\t]*\\n[ \\t]*\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|' + regexp; // \\begin{...} \\end{...} math delimiters
|
regexp = '^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|' + regexp; // \\begin{...} \\end{...} math block delimiters
|
||||||
}
|
}
|
||||||
regexp = new RegExp(regexp, 'gmi');
|
regexp = new RegExp(regexp, 'gm');
|
||||||
|
|
||||||
var converter = editor.getConverter();
|
var converter = editor.getConverter();
|
||||||
converter.hooks.chain("preConversion", function(text) {
|
converter.hooks.chain("preConversion", function(text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user