mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
604f13b34a
commit
75cc75bfde
2 changed files with 4 additions and 3 deletions
|
|
@ -313,6 +313,7 @@
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-subtype="echarts"],
|
[data-subtype="echarts"],
|
||||||
|
|
@ -555,11 +556,9 @@
|
||||||
user-select: none;
|
user-select: none;
|
||||||
counter-reset: linenumber;
|
counter-reset: linenumber;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: var(--b3-font-family-code);
|
font-family: var(--b3-font-family-code);
|
||||||
margin-right: 1em;
|
|
||||||
min-width: 1.2em;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
& > span {
|
& > span {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
||||||
} else {
|
} else {
|
||||||
block.firstElementChild.className = "fn__none";
|
block.firstElementChild.className = "fn__none";
|
||||||
block.firstElementChild.innerHTML = "";
|
block.firstElementChild.innerHTML = "";
|
||||||
|
block.lastElementChild.removeAttribute("style");
|
||||||
}
|
}
|
||||||
block.lastElementChild.innerHTML = window.hljs.highlight(
|
block.lastElementChild.innerHTML = window.hljs.highlight(
|
||||||
codeText + (codeText.endsWith("\n") ? "" : "\n"), // https://github.com/siyuan-note/siyuan/issues/4609
|
codeText + (codeText.endsWith("\n") ? "" : "\n"), // https://github.com/siyuan-note/siyuan/issues/4609
|
||||||
|
|
@ -147,4 +148,5 @@ export const lineNumberRender = (block: HTMLElement) => {
|
||||||
|
|
||||||
lineNumberTemp.remove();
|
lineNumberTemp.remove();
|
||||||
block.firstElementChild.innerHTML = lineNumberHTML;
|
block.firstElementChild.innerHTML = lineNumberHTML;
|
||||||
|
block.lastElementChild.setAttribute("style", `padding-left:${block.firstElementChild.clientWidth + 16}px`);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue