修复python代码库异步请求获取数据的时候高亮显示问题 (#920)

* 修复代码库读取缓存数据不高亮的问题

* 代码块重复点击高亮样式问题修复

---------

Co-authored-by: xiangshen <xiangshen@gw.com.cn>
pull/926/head
xiangshenb 2024-01-05 10:42:25 +08:00 committed by GitHub
parent d1b2476092
commit 663eb28de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ function loadDocument($url, $id, $callback) {
function initHighlighting() { function initHighlighting() {
try { try {
$('pre,pre.ql-syntax').each(function (i, block) { $('pre,pre.ql-syntax').each(function (i, block) {
if ($(this).hasClass('prettyprinted')) { if ($(this).hasClass('prettyprinted') || $(this).hasClass('hljs')) {
return; return;
} }
hljs.highlightBlock(block); hljs.highlightBlock(block);