mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
fix markdown-it-texmath
This commit is contained in:
parent
bb3f03fb17
commit
e55434965b
@ -5,6 +5,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function texmath(md, options) {
|
function texmath(md, options) {
|
||||||
|
texmath.escapeHtml = md.utils.escapeHtml;
|
||||||
const delimitersList = options && options.delimitersList || ['dollars'];
|
const delimitersList = options && options.delimitersList || ['dollars'];
|
||||||
const katexOptions = options && options.katexOptions || { throwOnError: false };
|
const katexOptions = options && options.katexOptions || { throwOnError: false };
|
||||||
katexOptions.macros = options && options.macros || katexOptions.macros; // ensure backwards compatibility
|
katexOptions.macros = options && options.macros || katexOptions.macros; // ensure backwards compatibility
|
||||||
@ -113,9 +114,9 @@ texmath.render = function(tex,displayMode,options) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (displayMode) {
|
if (displayMode) {
|
||||||
res = '$$$$' + tex + '$$$$';
|
res = '$$$$' + texmath.escapeHtml(tex) + '$$$$';
|
||||||
} else {
|
} else {
|
||||||
res = '$$' + tex + '$$';
|
res = '$$' + texmath.escapeHtml(tex) + '$$';
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -1007,3 +1007,5 @@ void ViewWindow::showReplaceResult(const QString &p_text, int p_totalReplaces)
|
|||||||
VNoteX::getInst().showStatusMessageShort(tr("Replaced %n match(es)", "", p_totalReplaces));
|
VNoteX::getInst().showStatusMessageShort(tr("Replaced %n match(es)", "", p_totalReplaces));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user