crossnote 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/cjs/index.cjs
CHANGED
|
@@ -176,9 +176,9 @@ ${Ne}
|
|
|
176
176
|
\`\`\` `;else{let Xe=et.as??null;if(et.code_block===!1)ht=Ne;else{let tt=Ct.slice(1,Ct.length);ht=`\`\`\`${Xe||dA[tt]||tt} ${et?bn(et):""}
|
|
177
177
|
${Ne}
|
|
178
178
|
\`\`\` `}}be=yt+1,Ae=Ae+1,F?_e=_e+ht+`
|
|
179
|
-
`:_e=_e+`{${bn({...et,embedding:btoa(encodeURIComponent(ht))})}}
|
|
179
|
+
`:_e=_e+`}){${bn({...et,embedding:btoa(encodeURIComponent(ht))})}}
|
|
180
180
|
`;continue}catch(Ne){ht=`<pre class="language-text"><code>${(0,pA.escape)(Ne.toString())}</code></pre> `,be=yt+1,Ae=Ae+1,F?_e=_e+ht+`
|
|
181
|
-
`:_e=_e+`{${bn({...et,error:btoa(encodeURIComponent(ht))})}}
|
|
181
|
+
`:_e=_e+`}){${bn({...et,error:btoa(encodeURIComponent(ht))})}}
|
|
182
182
|
`;continue}}else{be=yt+1,Ae=Ae+1,_e=_e+Me+`
|
|
183
183
|
`;continue}}if($e()&&!he&&(_e+=`${lz(Ae,{extraClass:"empty-line final-line end-of-document",prefix:""})}`),Ge){let Me=(Ge.match(/\n/g)??[]).length;_e=`
|
|
184
184
|
`.repeat(Me+1)+_e}if(Q){let Me=Q.slice(1);if(Me){let dt=Ie.findIndex(yt=>yt.id===Me);if(dt>=0){let yt=Ie[dt],St=dt,{level:rn}=yt,pn=St+1,jt=null;for(;pn<Ie.length;){let Tt=Ie[pn];if(Tt.level<=rn){jt=Tt;break}pn++}let xt=yt.lineNo;if(jt){Ie=Ie.slice(St,pn);let Tt=jt.lineNo;_e=_e.split(`
|
|
@@ -433,7 +433,7 @@ window["initRevealPresentation"] = async function() {
|
|
|
433
433
|
window.MathJax = (${JSON.stringify(Ae)});
|
|
434
434
|
</script>
|
|
435
435
|
<script type="text/javascript" async src="${this.notebook.config.mathjaxV3ScriptSrc}"></script>
|
|
436
|
-
`}else this.notebook.config.mathRenderingOption==="KaTeX"?T.offline?$=`<link rel="stylesheet" href="file:///${qe.resolve(_t(),"./dependencies/katex/katex.min.css")}">`:$=`<link rel="stylesheet" href="https://${this.notebook.config.jsdelivrCdnHost}/npm/katex@0.16.9/dist/katex.min.css">`:$="";let F="";b.indexOf('<i class="fa')>=0&&(T.offline?F=`<link rel="stylesheet" href="file:///${qe.resolve(_t(),"./dependencies/font-awesome/css/all.min.css")}">`:F=`<link rel="stylesheet" href="https://${this.notebook.config.jsdelivrCdnHost}/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css">`);let j="",W="";b.indexOf(' class="mermaid')>=0&&(T.offline?j=`<script type="text/javascript" src="file:///${qe.resolve(_t(),"./dependencies/mermaid/mermaid.min.js")}" charset="UTF-8"></script>`:j=`<script src="https://${this.notebook.config.jsdelivrCdnHost}/npm/mermaid@10.
|
|
436
|
+
`}else this.notebook.config.mathRenderingOption==="KaTeX"?T.offline?$=`<link rel="stylesheet" href="file:///${qe.resolve(_t(),"./dependencies/katex/katex.min.css")}">`:$=`<link rel="stylesheet" href="https://${this.notebook.config.jsdelivrCdnHost}/npm/katex@0.16.9/dist/katex.min.css">`:$="";let F="";b.indexOf('<i class="fa')>=0&&(T.offline?F=`<link rel="stylesheet" href="file:///${qe.resolve(_t(),"./dependencies/font-awesome/css/all.min.css")}">`:F=`<link rel="stylesheet" href="https://${this.notebook.config.jsdelivrCdnHost}/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css">`);let j="",W="";b.indexOf(' class="mermaid')>=0&&(T.offline?j=`<script type="text/javascript" src="file:///${qe.resolve(_t(),"./dependencies/mermaid/mermaid.min.js")}" charset="UTF-8"></script>`:j=`<script src="https://${this.notebook.config.jsdelivrCdnHost}/npm/mermaid@10.6.0/dist/mermaid.min.js"></script>`,W+=`<script type="module">
|
|
437
437
|
// TODO: If ZenUML gets integrated into mermaid in the future,
|
|
438
438
|
// we can remove the following lines.
|
|
439
439
|
${b.match(/zenuml/i)?`import zenuml from 'https://${this.notebook.config.jsdelivrCdnHost}/npm/@mermaid-js/mermaid-zenuml@0.1.0/dist/mermaid-zenuml.esm.min.mjs';
|
|
@@ -7,7 +7,7 @@ I managed some of the libraries by myself instead of through npm to reduce the o
|
|
|
7
7
|
"font-awesome": "6.4.2", // Download from here: https://fontawesome.com/download
|
|
8
8
|
// Fontawesome cheatsheet is available here: https://kapeli.com/cheat_sheets/Font_Awesome.docset/Contents/Resources/Documents/index
|
|
9
9
|
"katex": "v0.16.9", // Only keep the css and fonts files.
|
|
10
|
-
"mermaid": "10.
|
|
10
|
+
"mermaid": "10.6.0", // https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
|
|
11
11
|
"reveal": "4.6.0",
|
|
12
12
|
|
|
13
13
|
// NOTE: Don't forget to update `dependentLibraryMaterials` in `markdown-engine/index.ts`
|