mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
08208171be
commit
161c2af408
1 changed files with 3 additions and 0 deletions
|
|
@ -128,6 +128,9 @@ export const lineNumberRender = (block: HTMLElement) => {
|
|||
if (block.parentElement.getAttribute("lineNumber") === "false") {
|
||||
return;
|
||||
}
|
||||
if (!window.siyuan.config.editor.codeSyntaxHighlightLineNum && block.parentElement.getAttribute("lineNumber") !== "true") {
|
||||
return;
|
||||
}
|
||||
block.classList.add("protyle-linenumber");
|
||||
// clientHeight 总是取的整数
|
||||
block.parentElement.style.lineHeight = `${((parseInt(block.parentElement.style.fontSize) || window.siyuan.config.editor.fontSize) * 1.625 * 0.85).toFixed(0)}px`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue