mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
16ccda3f68
commit
91a768e4e7
2 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
||||||
|
|
||||||
setCodeTheme(cdn);
|
setCodeTheme(cdn);
|
||||||
|
|
||||||
addScript(`${cdn}/js/highlight.js/highlight.min.js?v=11.7.0`, "protyleHljsScript").then(() => {
|
addScript(`${cdn}/js/highlight.js/highlight.min.js?v=11.11.1`, "protyleHljsScript").then(() => {
|
||||||
addScript(`${cdn}/js/highlight.js/third-languages.js?v=1.0.1`, "protyleHljsThirdScript").then(() => {
|
addScript(`${cdn}/js/highlight.js/third-languages.js?v=1.0.1`, "protyleHljsThirdScript").then(() => {
|
||||||
codeElements.forEach((block: HTMLElement) => {
|
codeElements.forEach((block: HTMLElement) => {
|
||||||
const iconElements = block.parentElement.querySelectorAll(".protyle-icon");
|
const iconElements = block.parentElement.querySelectorAll(".protyle-icon");
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@ export const setCodeTheme = (cdn = Constants.PROTYLE_CDN) => {
|
||||||
css = "github-dark";
|
css = "github-dark";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const href = `${cdn}/js/highlight.js/styles/${css}.min.css?v=11.5.0`;
|
const href = `${cdn}/js/highlight.js/styles/${css}.min.css?v=11.11.1`;
|
||||||
if (!protyleHljsStyle) {
|
if (!protyleHljsStyle) {
|
||||||
addStyle(href, "protyleHljsStyle");
|
addStyle(href, "protyleHljsStyle");
|
||||||
} else if (!protyleHljsStyle.href.includes(href)) {
|
} else if (!protyleHljsStyle.href.includes(href)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue