This commit is contained in:
Vanessa 2022-12-31 22:14:42 +08:00
parent 7688733364
commit 4ee566cbd9
30 changed files with 153 additions and 163 deletions

View file

@ -9,7 +9,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
let isPreview = false;
if (element.classList.contains("code-block")) {
// 编辑器内代码块编辑渲染
codeElements = element.querySelectorAll('[spellcheck]');
codeElements = element.querySelectorAll("[spellcheck]");
} else {
if (element.classList.contains("item__readme")) {
// bazaar reademe
@ -22,7 +22,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
codeElements = element.querySelectorAll(".code-block code");
isPreview = true;
} else {
codeElements = element.querySelectorAll('.code-block [spellcheck]');
codeElements = element.querySelectorAll(".code-block [spellcheck]");
}
}
if (codeElements.length === 0) {