mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
4187f17937
commit
1dc894a66b
1 changed files with 3 additions and 2 deletions
|
|
@ -125,10 +125,11 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
||||||
};
|
};
|
||||||
|
|
||||||
export const lineNumberRender = (block: HTMLElement) => {
|
export const lineNumberRender = (block: HTMLElement) => {
|
||||||
if (block.parentElement.getAttribute("lineNumber") === "false") {
|
const lineNumber = block.parentElement.getAttribute("lineNumber")
|
||||||
|
if (lineNumber === "false") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!window.siyuan.config.editor.codeSyntaxHighlightLineNum && block.parentElement.getAttribute("lineNumber") !== "true") {
|
if (!window.siyuan.config.editor.codeSyntaxHighlightLineNum && lineNumber !== "true") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
block.classList.add("protyle-linenumber");
|
block.classList.add("protyle-linenumber");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue