mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-06-28 15:45:35 +08:00
解决两种高亮工具重复执行的问题
This commit is contained in:
parent
07e424474e
commit
98e93a19d5
@ -70,6 +70,9 @@ function loadDocument($url, $id, $callback) {
|
|||||||
*/
|
*/
|
||||||
function initHighlighting() {
|
function initHighlighting() {
|
||||||
$('pre,pre.ql-syntax').each(function (i, block) {
|
$('pre,pre.ql-syntax').each(function (i, block) {
|
||||||
|
if($(this).hasClass('prettyprinted')){
|
||||||
|
return;
|
||||||
|
}
|
||||||
hljs.highlightBlock(block);
|
hljs.highlightBlock(block);
|
||||||
});
|
});
|
||||||
hljs.initLineNumbersOnLoad();
|
hljs.initLineNumbersOnLoad();
|
||||||
|
Loading…
Reference in New Issue
Block a user