mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 02:37:59 +08:00
优化单页打印
This commit is contained in:
@@ -72,14 +72,17 @@ function loadDocument($url, $id, $callback) {
|
||||
* 初始化代码高亮
|
||||
*/
|
||||
function initHighlighting() {
|
||||
$('pre,pre.ql-syntax').each(function (i, block) {
|
||||
if($(this).hasClass('prettyprinted')){
|
||||
return;
|
||||
}
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
hljs.initLineNumbersOnLoad();
|
||||
|
||||
try {
|
||||
$('pre,pre.ql-syntax').each(function (i, block) {
|
||||
if ($(this).hasClass('prettyprinted')) {
|
||||
return;
|
||||
}
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
hljs.initLineNumbersOnLoad();
|
||||
}catch (e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user