🎨 Supports disabling Markdown syntax input for some inline elements https://github.com/siyuan-note/siyuan/issues/11141

This commit is contained in:
Daniel committed 2024-04-26 12:08:01 +08:00
1 parent 53f5b08038
commit b9f269ae85
17 files changed
+185 -41

No files matched your search

+8
View File
@@ -1,4 +1,12 @@
{
"editorMarkdownInlineSup": "Markdown inline superscript syntax",
"editorMarkdownInlineSupTip": "After enabling, <code class='fn__code'>^foo^</code> inline superscript input will be supported",
"editorMarkdownInlineSub": "Markdown inline subscript syntax",
"editorMarkdownInlineSubTip": "After enabling, <code class='fn__code'>~foo~</code> inline subscript input will be supported",
"editorMarkdownInlineTag": "Markdown inline tag syntax",
"editorMarkdownInlineTagTip": "After enabling, <code class='fn__code'>#foo#</code> inline tag input will be supported",
"editorMarkdownInlineMath": "Markdown inline formula syntax",
"editorMarkdownInlineMathTip": "After enabling, <code class='fn__code'>$foo$</code> inline formula input will be supported",
"currentNotebook": "Current Notebook",
"containerBlockTip1": "Enabling container blocks will result in duplicate search results",
"containerBlockTip2": "Enabling document blocks currently only supports searching for document titles",
+8
View File
@@ -1,4 +1,12 @@
{
"editorMarkdownInlineSup": "Sintaxis de superíndice en línea de Markdown",
"editorMarkdownInlineSupTip": "Después de habilitar, se admitirá la entrada de superíndice en línea <code class='fn__code'>^foo^</code>",
"editorMarkdownInlineSub": "Sintaxis del subíndice en línea de Markdown",
"editorMarkdownInlineSubTip": "Después de habilitar, se admitirá la entrada de subíndice en línea <code class='fn__code'>~foo~</code>",
"editorMarkdownInlineTag": "Sintaxis de etiquetas en línea de Markdown",
"editorMarkdownInlineTagTip": "Después de habilitar, se admitirá la entrada de etiquetas en línea <code class='fn__code'>#foo#</code>",
"editorMarkdownInlineMath": "Sintaxis de fórmula en línea de Markdown",
"editorMarkdownInlineMathTip": "Después de habilitar, se admitirá la entrada de fórmula en línea <code class='fn__code'>$foo$</code>",
"currentNotebook": "Cuaderno actual",
"containerBlockTip1": "Habilitar bloques de contenedores generará resultados de búsqueda duplicados",
"containerBlockTip2": "Habilitar bloques de documentos actualmente solo admite la búsqueda de títulos de documentos",
+8
View File
@@ -1,4 +1,12 @@
{
"editorMarkdownInlineSup": "Syntaxe exposant Markdown en ligne",
"editorMarkdownInlineSupTip": "Après l'activation, la saisie en exposant <code class='fn__code'>^foo^</code> en ligne sera prise en charge",
"editorMarkdownInlineSub": "Syntaxe d'indice en ligne Markdown",
"editorMarkdownInlineSubTip": "Après l'activation, la saisie en indice <code class='fn__code'>~foo~</code> en ligne sera prise en charge",
"editorMarkdownInlineTag": "Syntaxe des balises en ligne Markdown",
"editorMarkdownInlineTagTip": "Après l'activation, la saisie de balises en ligne <code class='fn__code'>#foo#</code> sera prise en charge",
"editorMarkdownInlineMath": "Syntaxe de formule en ligne Markdown",
"editorMarkdownInlineMathTip": "Après l'activation, la saisie de formule en ligne <code class='fn__code'>$foo$</code> sera prise en charge",
"currentNotebook": "Carnet actuel",
"containerBlockTip1": "L'activation des blocs de conteneurs entraînera des résultats de recherche en double",
"containerBlockTip2": "L'activation des blocs de documents ne prend actuellement en charge que la recherche de titres de documents",
+8
View File
@@ -1,4 +1,12 @@
{
"editorMarkdownInlineSup": "Markdown 行級上標語法",
"editorMarkdownInlineSupTip": "啟用後將支援 <code class='fn__code'>^foo^</code> 行級上標輸入",
"editorMarkdownInlineSub": "Markdown 行級下標語法",
"editorMarkdownInlineSubTip": "啟用後將支援 <code class='fn__code'>~foo~</code> 行級下標輸入",
"editorMarkdownInlineTag": "Markdown 行級標籤語法",
"editorMarkdownInlineTagTip": "啟用後將支援 <code class='fn__code'>#foo#</code> 行級標籤輸入",
"editorMarkdownInlineMath": "Markdown 行級公式語法",
"editorMarkdownInlineMathTip": "啟用後將支援 <code class='fn__code'>$foo$</code> 行級公式輸入",
"currentNotebook": "目前筆記本",
"containerBlockTip1": "啟用容器區塊後會導致搜尋結果重複",
"containerBlockTip2": "啟用文件區塊目前僅支援搜尋文件名稱",
+8
View File
@@ -1,4 +1,12 @@
{
"editorMarkdownInlineSup": "Markdown 行级上标语法",
"editorMarkdownInlineSupTip": "启用后将支持 <code class='fn__code'>^foo^</code> 上标输入",
"editorMarkdownInlineSub": "Markdown 行级下标语法",
"editorMarkdownInlineSubTip": "启用后将支持 <code class='fn__code'>~foo~</code> 下标输入",
"editorMarkdownInlineTag": "Markdown 行级标签语法",
"editorMarkdownInlineTagTip": "启用后将支持 <code class='fn__code'>#foo#</code> 标签输入",
"editorMarkdownInlineMath": "Markdown 行级公式语法",
"editorMarkdownInlineMathTip": "启用后将支持 <code class='fn__code'>$foo$</code> 行级公式输入",
"currentNotebook": "当前笔记本",
"containerBlockTip1": "启用容器块后会导致搜索结果重复",
"containerBlockTip2": "启用文档块目前仅支持搜索文档名",
+41
View File
@@ -24,6 +24,38 @@ export const editor = {
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="fullWidth" type="checkbox"${window.siyuan.config.editor.fullWidth ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineSup}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineSupTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineSup" type="checkbox"${window.siyuan.config.editor.markdown.inlineSup ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineSub}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineSubTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineSub" type="checkbox"${window.siyuan.config.editor.markdown.inlineSub ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineTag}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineTagTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineTag" type="checkbox"${window.siyuan.config.editor.markdown.inlineTag ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.editorMarkdownInlineMath}
<div class="b3-label__text">${window.siyuan.languages.editorMarkdownInlineMathTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="editorMarkdownInlineMath" type="checkbox"${window.siyuan.config.editor.markdown.inlineMath ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.justify}
@@ -296,8 +328,16 @@ export const editor = {
(editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "1024";
}
let markdown = {
inlineSup: (editor.element.querySelector("#editorMarkdownInlineSup") as HTMLInputElement).checked,
inlineSub: (editor.element.querySelector("#editorMarkdownInlineSub") as HTMLInputElement).checked,
inlineTag: (editor.element.querySelector("#editorMarkdownInlineTag") as HTMLInputElement).checked,
inlineMath: (editor.element.querySelector("#editorMarkdownInlineMath") as HTMLInputElement).checked
};
fetchPost("/api/setting/setEditor", {
fullWidth: (editor.element.querySelector("#fullWidth") as HTMLInputElement).checked,
markdown: markdown,
justify: (editor.element.querySelector("#justify") as HTMLInputElement).checked,
rtl: (editor.element.querySelector("#rtl") as HTMLInputElement).checked,
readOnly: (editor.element.querySelector("#readOnly") as HTMLInputElement).checked,
@@ -371,6 +411,7 @@ export const editor = {
item.editor.protyle.contentElement.removeAttribute("data-fullwidth");
}
});
setInlineStyle();
}
};
+5 -2
View File
@@ -25,8 +25,11 @@ export const setLute = (options: ILuteOptions) => {
lute.SetTag(true);
lute.SetSuperBlock(true);
lute.SetMark(true);
lute.SetSup(true);
lute.SetSub(true);
lute.SetSup(window.siyuan.config.editor.markdown.inlineSup);
lute.SetSub(window.siyuan.config.editor.markdown.inlineSub);
lute.SetTag(window.siyuan.config.editor.markdown.inlineTag);
lute.SetInlineMath(window.siyuan.config.editor.markdown.inlineMath);
lute.SetGFMStrikethrough1(false);
lute.SetSpin(true);
lute.SetProtyleWYSIWYG(true);
if (options.lazyLoadImage) {
+28
View File
@@ -279,10 +279,38 @@ declare namespace Config {
trust: boolean;
}
/**
* SiYuan editor markdown related configuration
*/
interface IMarkdown {
/**
* Whether to enable the inline superscript
*/
inlineSup: boolean;
/**
* Whether to enable the inline subscript
*/
inlineSub: boolean;
/**
* Whether to enable the inline tag
*/
inlineTag: boolean;
/**
* Whether to enable the inline math
*/
inlineMath: boolean;
}
/**
* SiYuan editor related configuration
*/
export interface IEditor {
/**
* Markdown configuration
*/
markdown: IMarkdown;
/**
* The default number of backlinks to expand
*/
+4
View File
@@ -202,6 +202,10 @@ declare class Lute {
public SetTag(enable: boolean): void;
public SetInlineMath(enable: boolean): void;
public SetGFMStrikethrough1(enable: boolean): void;
public SetMark(enable: boolean): void;
public SetSub(enable: boolean): void;
+2 -2
View File
@@ -51,14 +51,14 @@ $packages["github.com/88250/lute/html"]=(function(){var $pkg={},$init,J,E,F,H,I,
$packages["github.com/88250/lute/util"]=(function(){var $pkg={},$init,E,B,F,G,A,C,D,AO,AQ,AR,AS,R,S,T,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN;E=$packages["bytes"];B=$packages["github.com/88250/lute/editor"];F=$packages["github.com/88250/lute/html"];G=$packages["github.com/88250/lute/html/atom"];A=$packages["strconv"];C=$packages["strings"];D=$packages["unicode/utf8"];AO=$sliceType($Uint8);AQ=$sliceType($Int32);AR=$ptrType(F.Node);AS=$sliceType(AR);R=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:a=C.ReplaceAll(a,"\xE2\x80\x8B","");a=C.ReplaceAll(a,"\xE2\x80\x8D","");b=C.TrimSpace(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=0===b.length;$s=2;case 2:return c;}return;}var $f={$blk:R,$c:true,$r,a,b,c,$s};return $f;};$pkg.IsEmptyStr=R;S=function(a){var{a,b,c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=0;c=0;d=C.Fields(a);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=e;g=0;while(true){if(!(g<f.$length)){break;}h=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);i=T(h);j=i[0];k=i[1];b=b+(j)>>0;c=c+(k)>>0;g++;}$s=-1;return[b,c];}return;}var $f={$blk:S,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,$s};return $f;};$pkg.WordCount=S;T=function(a){var a,b,c,d,e,f,g,h,i,j;b=0;c=0;d=(new AQ($stringToRunes(a)));e=d.$length;if(1>e){return[b,c];}f=1;g=1;b=f;c=g;h=(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])<128;i=1;while(true){if(!(i<e)){break;}j=((i<0||i>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+i]);b=b+(1)>>0;if(j>=128){c=c+(1)>>0;h=false;i=i+(1)>>0;continue;}if(j<128===h){i=i+(1)>>0;continue;}c=c+(1)>>0;h=!h;i=i+(1)>>0;}return[b,c];};V=function(a){var a;return E.Contains(a,(new AO($stringToBytes("type=\"doc\""))));};$pkg.IsDocIAL=V;W=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c<b.$length)){break;}d=((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);if("type"===(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])&&"doc"===(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1])){return true;}c++;}return false;};$pkg.IsDocIAL2=W;X=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b="";c=AH(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;b=C.ReplaceAll(b,"\xE2\x80\x8B","");b=C.TrimPrefix(b,"\n");b=C.TrimSuffix(b,"\n");b=F.EscapeHTMLStr(b);$s=-1;return b;}return;}var $f={$blk:X,$c:true,$r,a,b,c,$s};return $f;};$pkg.GetTextMarkTextDataWithoutEscapeSingleQuote=X;Y=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b="";c=X(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;b=C.ReplaceAll(b,"'","&apos;");$s=-1;return b;}return;}var $f={$blk:Y,$c:true,$r,a,b,c,$s};return $f;};$pkg.GetTextMarkTextData=Y;Z=function(a){var a,b;b="";b=AK(a,"data-inline-memo-content");b=C.ReplaceAll(b,"\xE2\x80\x8B","");b=C.ReplaceAll(b,"\n","_esc_newline_");b=F.UnescapeHTMLStr(b);return b;};$pkg.GetTextMarkInlineMemoData=Z;AA=function(a){var a,b,c;b="";c="";b=AK(a,"data-href");b=F.EscapeHTMLStr(b);c=AK(a,"data-title");c=F.EscapeHTMLStr(c);return[b,c];};$pkg.GetTextMarkAData=AA;AB=function(a){var a,b;b="";b=AK(a,"data-content");b=C.ReplaceAll(b,"\n","_esc_newline_");b=F.UnescapeHTMLStr(b);b=C.ReplaceAll(b,"\xE2\x80\x8B","");return b;};$pkg.GetTextMarkInlineMathData=AB;AC=function(a){var a,b,c;b="";c="";b=AK(a,"data-id");c=AK(a,"data-subtype");if(""===c){c="s";}return[b,c];};$pkg.GetTextMarkBlockRefData=AC;AD=function(a){var a,b;b="";b=AK(a,"data-id");return b;};$pkg.GetTextMarkFileAnnotationRefData=AD;AE=function(a,b){var a,b,c;c=a.FirstChild;while(true){if(!(!(AR.nil===c))){break;}if(c.DataAtom===b){return c;}c=c.NextSibling;}return AR.nil;};$pkg.DomChildByType=AE;AF=function(a,b){var a,b,c,d;c=AS.nil;d=a.FirstChild;while(true){if(!(!(AR.nil===d))){break;}if(d.DataAtom===b){c=$append(c,d);}c=$appendSlice(c,AF(d,b));d=d.NextSibling;}return c;};$pkg.DomChildrenByType=AF;AG=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:if(AR.nil===a){$s=-1;return AO.nil;}b=new E.Buffer.ptr(AO.nil,0,0);c=F.Render(b,a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return E.ReplaceAll(b.Bytes(),(new AO($stringToBytes("\xE2\x80\x8B"))),AO.nil);}return;}var $f={$blk:AG,$c:true,$r,a,b,c,$s};return $f;};$pkg.DomHTML=AG;AH=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=new E.Buffer.ptr(AO.nil,0,0);if(1===a.Type){$s=1;continue;}$s=2;continue;case 1:c=b.WriteString(a.Data);$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=-1;return b.String();case 2:d=a.FirstChild;casLine truncated
$packages["math/rand"]=(function(){var $pkg={},$init,B,A,F,H,I,K,AE,AM,AN,AO,AQ,AR,AS,AT,AU,AV,E,N,AG,AH,AI,AJ,AK,AL,G,J,L,M,O,W,AF;B=$packages["github.com/gopherjs/gopherjs/nosync"];A=$packages["math"];F=$pkg.rngSource=$newType(0,$kindStruct,"rand.rngSource",true,"math/rand",false,function(tap_,feed_,vec_){this.$val=this;if(arguments.length===0){this.tap=0;this.feed=0;this.vec=AQ.zero();return;}this.tap=tap_;this.feed=feed_;this.vec=vec_;});H=$pkg.Source=$newType(8,$kindInterface,"rand.Source",true,"math/rand",true,null);I=$pkg.Source64=$newType(8,$kindInterface,"rand.Source64",true,"math/rand",true,null);K=$pkg.Rand=$newType(0,$kindStruct,"rand.Rand",true,"math/rand",true,function(src_,s64_,readVal_,readPos_){this.$val=this;if(arguments.length===0){this.src=$ifaceNil;this.s64=$ifaceNil;this.readVal=new $Int64(0,0);this.readPos=0;return;}this.src=src_;this.s64=s64_;this.readVal=readVal_;this.readPos=readPos_;});AE=$pkg.lockedSource=$newType(0,$kindStruct,"rand.lockedSource",true,"math/rand",false,function(lk_,src_){this.$val=this;if(arguments.length===0){this.lk=new B.Mutex.ptr(false);this.src=AM.nil;return;}this.lk=lk_;this.src=src_;});AM=$ptrType(F);AN=$ptrType(AE);AO=$ptrType(K);AQ=$arrayType($Int64,607);AR=$ptrType($Int8);AS=$sliceType($Int);AT=$ptrType($Int64);AU=$funcType([$Int,$Int],[],false);AV=$sliceType($Uint8);G=function(a){var a,b,c,d,e;c=(b=a/44488,(b===b&&b!==1/0&&b!==-1/0)?b>>0:$throwRuntimeError("integer divide by zero"));e=(d=a%44488,d===d?d:$throwRuntimeError("integer divide by zero"));a=($imul(48271,e))-($imul(3399,c))>>0;if(a<0){a=a+(2147483647)>>0;}return a;};F.ptr.prototype.Seed=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;b.tap=0;b.feed=334;a=$div64(a,new $Int64(0,2147483647),true);if((a.$high<0||(a.$high===0&&a.$low<0))){a=(c=new $Int64(0,2147483647),new $Int64(a.$high+c.$high,a.$low+c.$low));}if((a.$high===0&&a.$low===0)){a=new $Int64(0,89482311);}d=(((a.$low+((a.$high>>31)*4294967296))>>0));e=-20;while(true){if(!(e<607)){break;}d=G(d);if(e>=0){f=new $Int64(0,0);f=$shiftLeft64((new $Int64(0,d)),40);d=G(d);f=(g=$shiftLeft64((new $Int64(0,d)),20),new $Int64(f.$high^g.$high,(f.$low^g.$low)>>>0));d=G(d);f=(h=(new $Int64(0,d)),new $Int64(f.$high^h.$high,(f.$low^h.$low)>>>0));f=(i=((e<0||e>=E.length)?($throwRuntimeError("index out of range"),undefined):E[e]),new $Int64(f.$high^i.$high,(f.$low^i.$low)>>>0));(j=b.vec,((e<0||e>=j.length)?($throwRuntimeError("index out of range"),undefined):j[e]=f));}e=e+(1)>>0;}};F.prototype.Seed=function(a){return this.$val.Seed(a);};F.ptr.prototype.Int63=function(){var a,b,c;a=this;return((b=(c=a.Uint64(),new $Uint64(c.$high&2147483647,(c.$low&4294967295)>>>0)),new $Int64(b.$high,b.$low)));};F.prototype.Int63=function(){return this.$val.Int63();};F.ptr.prototype.Uint64=function(){var a,b,c,d,e,f,g,h,i,j;a=this;a.tap=a.tap-(1)>>0;if(a.tap<0){a.tap=a.tap+(607)>>0;}a.feed=a.feed-(1)>>0;if(a.feed<0){a.feed=a.feed+(607)>>0;}h=(b=(c=a.vec,d=a.feed,((d<0||d>=c.length)?($throwRuntimeError("index out of range"),undefined):c[d])),e=(f=a.vec,g=a.tap,((g<0||g>=f.length)?($throwRuntimeError("index out of range"),undefined):f[g])),new $Int64(b.$high+e.$high,b.$low+e.$low));(i=a.vec,j=a.feed,((j<0||j>=i.length)?($throwRuntimeError("index out of range"),undefined):i[j]=h));return(new $Uint64(h.$high,h.$low));};F.prototype.Uint64=function(){return this.$val.Uint64();};J=function(a){var a,b;b=new F.ptr(0,0,AQ.zero());b.Seed(a);return b;};$pkg.NewSource=J;L=function(a){var a,b,c;b=$assertType(a,I,true);c=b[0];return new K.ptr(a,c,new $Int64(0,0),0);};$pkg.New=L;K.ptr.prototype.Seed=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=$assertType(b.src,AN,true);d=c[0];e=c[1];if(e){d.seedPos(a,(b.$ptr_readPos||(b.$ptr_readPos=new AR(function(){return this.$target.readPos;},function($v){this.$target.readPos=$v;},b))));$s=-1;return;}$r=b.src.Seed(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.readPos=0;$s=-1;return;}return;}var $f={$blk:K.ptr.prototype.Seed,$c:true,$r,a,b,c,d,e,$s};return $f;};K.prototype.Seed=function(a){return this.$val.Seed(a);};K.ptr.prototype.Int63=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.src.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$s=2;case 2:return c;}return;}var $f={$blk:K.ptr.prototype.Int63,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Int63=function(){return this.$val.Int63();};K.ptr.prototype.Uint32=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=(($shiftRightInt64(b,31).$low>>>0));$s=2;case 2:return c;}return;}var $f={$blk:K.ptr.prototype.Uint32,$c:true,$r,a,b,c,$s};return $f;};K.prototype.Uint32=function(){return this.$val.Uint32();};K.ptr.prototype.Uint64=function(){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{});$s=Line truncated
$packages["github.com/88250/lute/ast"]=(function(){var $pkg={},$init,B,I,J,K,L,C,D,A,E,F,G,H,M,R,S,X,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,Q,Y,Z,O,P,T,U,V,W,AA;B=$packages["bytes"];I=$packages["github.com/88250/lute/editor"];J=$packages["github.com/88250/lute/html"];K=$packages["github.com/88250/lute/lex"];L=$packages["github.com/88250/lute/util"];C=$packages["math/rand"];D=$packages["sort"];A=$packages["strconv"];E=$packages["strings"];F=$packages["sync"];G=$packages["time"];H=$packages["unicode/utf8"];M=$pkg.WalkStatus=$newType(4,$kindInt,"ast.WalkStatus",true,"github.com/88250/lute/ast",true,null);R=$pkg.Node=$newType(0,$kindStruct,"ast.Node",true,"github.com/88250/lute/ast",true,function(ID_,Box_,Path_,Spec_,Type_,Parent_,Previous_,Next_,FirstChild_,LastChild_,Children_,Tokens_,TypeStr_,Data_,Close_,LastLineBlank_,LastLineChecked_,CodeMarkerLen_,IsFencedCodeBlock_,CodeBlockFenceChar_,CodeBlockFenceLen_,CodeBlockFenceOffset_,CodeBlockOpenFence_,CodeBlockInfo_,CodeBlockCloseFence_,HtmlBlockType_,ListData_,TaskListItemChecked_,TableAligns_,TableCellAlign_,TableCellContentWidth_,TableCellContentMaxWidth_,LinkType_,LinkRefLabel_,HeadingLevel_,HeadingSetext_,HeadingNormalizedID_,MathBlockDollarOffset_,FootnotesRefLabel_,FootnotesRefId_,FootnotesRefs_,HtmlEntityTokens_,KramdownIAL_,Properties_,TextMarkType_,TextMarkAHref_,TextMarkATitle_,TextMarkInlineMathContent_,TextMarkInlineMemoContent_,TextMarkBlockRefID_,TextMarkBlockRefSubtype_,TextMarkFileAnnotationRefID_,TextMarkTextContent_,AttributeViewID_,AttributeViewType_,CustomBlockFenceOffset_,CustomBlockInfo_){this.$val=this;if(arguments.length===0){this.ID="";this.Box="";this.Path="";this.Spec="";this.Type=0;this.Parent=AB.nil;this.Previous=AB.nil;this.Next=AB.nil;this.FirstChild=AB.nil;this.LastChild=AB.nil;this.Children=AE.nil;this.Tokens=AF.nil;this.TypeStr="";this.Data="";this.Close=false;this.LastLineBlank=false;this.LastLineChecked=false;this.CodeMarkerLen=0;this.IsFencedCodeBlock=false;this.CodeBlockFenceChar=0;this.CodeBlockFenceLen=0;this.CodeBlockFenceOffset=0;this.CodeBlockOpenFence=AF.nil;this.CodeBlockInfo=AF.nil;this.CodeBlockCloseFence=AF.nil;this.HtmlBlockType=0;this.ListData=AG.nil;this.TaskListItemChecked=false;this.TableAligns=AH.nil;this.TableCellAlign=0;this.TableCellContentWidth=0;this.TableCellContentMaxWidth=0;this.LinkType=0;this.LinkRefLabel=AF.nil;this.HeadingLevel=0;this.HeadingSetext=false;this.HeadingNormalizedID="";this.MathBlockDollarOffset=0;this.FootnotesRefLabel=AF.nil;this.FootnotesRefId="";this.FootnotesRefs=AE.nil;this.HtmlEntityTokens=AF.nil;this.KramdownIAL=AI.nil;this.Properties=false;this.TextMarkType="";this.TextMarkAHref="";this.TextMarkATitle="";this.TextMarkInlineMathContent="";this.TextMarkInlineMemoContent="";this.TextMarkBlockRefID="";this.TextMarkBlockRefSubtype="";this.TextMarkFileAnnotationRefID="";this.TextMarkTextContent="";this.AttributeViewID="";this.AttributeViewType="";this.CustomBlockFenceOffset=0;this.CustomBlockInfo="";return;}this.ID=ID_;this.Box=Box_;this.Path=Path_;this.Spec=Spec_;this.Type=Type_;this.Parent=Parent_;this.Previous=Previous_;this.Next=Next_;this.FirstChild=FirstChild_;this.LastChild=LastChild_;this.Children=Children_;this.Tokens=Tokens_;this.TypeStr=TypeStr_;this.Data=Data_;this.Close=Close_;this.LastLineBlank=LastLineBlank_;this.LastLineChecked=LastLineChecked_;this.CodeMarkerLen=CodeMarkerLen_;this.IsFencedCodeBlock=IsFencedCodeBlock_;this.CodeBlockFenceChar=CodeBlockFenceChar_;this.CodeBlockFenceLen=CodeBlockFenceLen_;this.CodeBlockFenceOffset=CodeBlockFenceOffset_;this.CodeBlockOpenFence=CodeBlockOpenFence_;this.CodeBlockInfo=CodeBlockInfo_;this.CodeBlockCloseFence=CodeBlockCloseFence_;this.HtmlBlockType=HtmlBlockType_;this.ListData=ListData_;this.TaskListItemChecked=TaskListItemChecked_;this.TableAligns=TableAligns_;this.TableCellAlign=TableCellAlign_;this.TableCellContentWidth=TableCellContentWidth_;this.TableCellContentMaxWidth=TableCellContentMaxWidth_;this.LinkType=LinkType_;this.LinkRefLabel=LinkRefLabel_;this.HeadingLevel=HeadingLevel_;this.HeadingSetext=HeadingSetext_;this.HeadingNormalizedID=HeadingNormalizedID_;this.MathBlockDollarOffset=MathBlockDollarOffset_;this.FootnotesRefLabel=FootnotesRefLabel_;this.FootnotesRefId=FootnotesRefId_;this.FootnotesRefs=FootnotesRefs_;this.HtmlEntityTokens=HtmlEntityTokens_;this.KramdownIAL=KramdownIAL_;this.Properties=Properties_;this.TextMarkType=TextMarkType_;this.TextMarkAHref=TextMarkAHref_;this.TextMarkATitle=TextMarkATitle_;this.TextMarkInlineMathContent=TextMarkInlineMathContent_;this.TextMarkInlineMemoContent=TextMarkInlineMemoContent_;this.TextMarkBlockRefID=TextMarkBlockRefID_;this.TextMarkBlockRefSubtype=TextMarkBlockRefSubtype_;this.TextMarkFileAnnotationRefID=TextMarkFileAnnotationRefID_;this.TextMarkTextContent=TextMarkTextContent_;this.AttributeViewID=AttributeViewID_;this.AttributeViewType=AttributeViewType_;this.CustomBlockFenceOffset=CustomBlockFenceOffset_;this.CustomBlockInfo=CustomBlockInfo_;});S=$pkg.ListData=$newTypLine truncated
$packages["github.com/88250/lute/parse"]=(function(){var $pkg={},$init,A,B,C,G,K,D,E,I,F,H,L,J,AA,AB,AC,AD,CA,CL,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,T,AL,AN,AY,AZ,BK,BL,BM,BN,BO,BP,BQ,BR,BZ,CG,CN,CP,CQ,CR,CS,CT,CV,a,M,N,O,P,R,S,U,V,W,X,Z,AE,AF,AG,AH,AI,AJ,AK,AM,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,BA,BD,BE,BG,BH,BI,BJ,BS,BT,BU,BV,BW,BX,BY,CC,CD,CE,CF,CH,CI,CJ,CK,CM,CU;A=$packages["bytes"];B=$packages["github.com/88250/lute/ast"];C=$packages["github.com/88250/lute/editor"];G=$packages["github.com/88250/lute/html"];K=$packages["github.com/88250/lute/html/atom"];D=$packages["github.com/88250/lute/lex"];E=$packages["github.com/88250/lute/util"];I=$packages["strconv"];F=$packages["strings"];H=$packages["sync"];L=$packages["unicode"];J=$packages["unicode/utf8"];AA=$pkg.Context=$newType(0,$kindStruct,"parse.Context",true,"github.com/88250/lute/parse",true,function(Tree_,ParseOption_,Tip_,oldtip_,currentLine_,currentLineLen_,offset_,column_,nextNonspace_,nextNonspaceColumn_,indent_,indented_,blank_,partiallyConsumedTab_,allClosed_,lastMatchedContainer_,rootIAL_){this.$val=this;if(arguments.length===0){this.Tree=DH.nil;this.ParseOption=DL.nil;this.Tip=CY.nil;this.oldtip=CY.nil;this.currentLine=CW.nil;this.currentLineLen=0;this.offset=0;this.column=0;this.nextNonspace=0;this.nextNonspaceColumn=0;this.indent=0;this.indented=false;this.blank=false;this.partiallyConsumedTab=false;this.allClosed=false;this.lastMatchedContainer=CY.nil;this.rootIAL=CY.nil;return;}this.Tree=Tree_;this.ParseOption=ParseOption_;this.Tip=Tip_;this.oldtip=oldtip_;this.currentLine=currentLine_;this.currentLineLen=currentLineLen_;this.offset=offset_;this.column=column_;this.nextNonspace=nextNonspace_;this.nextNonspaceColumn=nextNonspaceColumn_;this.indent=indent_;this.indented=indented_;this.blank=blank_;this.partiallyConsumedTab=partiallyConsumedTab_;this.allClosed=allClosed_;this.lastMatchedContainer=lastMatchedContainer_;this.rootIAL=rootIAL_;});AB=$pkg.InlineContext=$newType(0,$kindStruct,"parse.InlineContext",true,"github.com/88250/lute/parse",true,function(tokens_,tokensLen_,pos_,delimiters_,brackets_){this.$val=this;if(arguments.length===0){this.tokens=CW.nil;this.tokensLen=0;this.pos=0;this.delimiters=DM.nil;this.brackets=DM.nil;return;}this.tokens=tokens_;this.tokensLen=tokensLen_;this.pos=pos_;this.delimiters=delimiters_;this.brackets=brackets_;});AC=$pkg.Tree=$newType(0,$kindStruct,"parse.Tree",true,"github.com/88250/lute/parse",true,function(Root_,Context_,lexer_,inlineContext_,Name_,ID_,Box_,Path_,HPath_,Marks_,Created_,Updated_,Hash_){this.$val=this;if(arguments.length===0){this.Root=CY.nil;this.Context=DI.nil;this.lexer=DJ.nil;this.inlineContext=DK.nil;this.Name="";this.ID="";this.Box="";this.Path="";this.HPath="";this.Marks=DC.nil;this.Created=new $Int64(0,0);this.Updated=new $Int64(0,0);this.Hash="";return;}this.Root=Root_;this.Context=Context_;this.lexer=lexer_;this.inlineContext=inlineContext_;this.Name=Name_;this.ID=ID_;this.Box=Box_;this.Path=Path_;this.HPath=HPath_;this.Marks=Marks_;this.Created=Created_;this.Updated=Updated_;this.Hash=Hash_;});AD=$pkg.Options=$newType(0,$kindStruct,"parse.Options",true,"github.com/88250/lute/parse",true,function(GFMTable_,GFMTaskListItem_,GFMStrikethrough_,GFMAutoLink_,Footnotes_,HeadingID_,ToC_,Emoji_,AliasEmoji_,EmojiAlias_,EmojiSite_,VditorWYSIWYG_,VditorIR_,VditorSV_,ProtyleWYSIWYG_,InlineMathAllowDigitAfterOpenMarker_,Setext_,YamlFrontMatter_,BlockRef_,FileAnnotationRef_,Mark_,KramdownBlockIAL_,KramdownSpanIAL_,Tag_,ImgPathAllowSpace_,SuperBlock_,Sup_,Sub_,GitConflict_,LinkRef_,IndentCodeBlock_,ParagraphBeginningSpace_,DataImage_,TextMark_,HTMLTag2TextMark_,Spin_){this.$val=this;if(arguments.length===0){this.GFMTable=false;this.GFMTaskListItem=false;this.GFMStrikethrough=false;this.GFMAutoLink=false;this.Footnotes=false;this.HeadingID=false;this.ToC=false;this.Emoji=false;this.AliasEmoji=false;this.EmojiAlias=false;this.EmojiSite="";this.VditorWYSIWYG=false;this.VditorIR=false;this.VditorSV=false;this.ProtyleWYSIWYG=false;this.InlineMathAllowDigitAfterOpenMarker=false;this.Setext=false;this.YamlFrontMatter=false;this.BlockRef=false;this.FileAnnotationRef=false;this.Mark=false;this.KramdownBlockIAL=false;this.KramdownSpanIAL=false;this.Tag=false;this.ImgPathAllowSpace=false;this.SuperBlock=false;this.Sup=false;this.Sub=false;this.GitConflict=false;this.LinkRef=false;this.IndentCodeBlock=false;this.ParagraphBeginningSpace=false;this.DataImage=false;this.TextMark=false;this.HTMLTag2TextMark=false;this.Spin=false;return;}this.GFMTable=GFMTable_;this.GFMTaskListItem=GFMTaskListItem_;this.GFMStrikethrough=GFMStrikethrough_;this.GFMAutoLink=GFMAutoLink_;this.Footnotes=Footnotes_;this.HeadingID=HeadingID_;this.ToC=ToC_;this.Emoji=Emoji_;this.AliasEmoji=AliasEmoji_;this.EmojiAlias=EmojiAlias_;this.EmojiSite=EmojiSite_;this.VditorWYSIWYG=VditorWYSIWYG_;this.VditorIR=VditorIR_;this.VditorSV=VditorSV_;this.ProtyleWYSIWYG=ProtyleWYSIWYG_;this.InlineMathAllowDigitAfterOpenMarLine truncated
$packages["github.com/88250/lute/parse"]=(function(){var $pkg={},$init,A,B,C,G,K,D,E,I,F,H,L,J,AA,AB,AC,AD,CA,CL,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,T,AL,AN,AY,AZ,BK,BL,BM,BN,BO,BP,BQ,BR,BZ,CG,CN,CP,CQ,CR,CS,CT,CV,a,M,N,O,P,R,S,U,V,W,X,Z,AE,AF,AG,AH,AI,AJ,AK,AM,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,BA,BD,BE,BG,BH,BI,BJ,BS,BT,BU,BV,BW,BX,BY,CC,CD,CE,CF,CH,CI,CJ,CK,CM,CU;A=$packages["bytes"];B=$packages["github.com/88250/lute/ast"];C=$packages["github.com/88250/lute/editor"];G=$packages["github.com/88250/lute/html"];K=$packages["github.com/88250/lute/html/atom"];D=$packages["github.com/88250/lute/lex"];E=$packages["github.com/88250/lute/util"];I=$packages["strconv"];F=$packages["strings"];H=$packages["sync"];L=$packages["unicode"];J=$packages["unicode/utf8"];AA=$pkg.Context=$newType(0,$kindStruct,"parse.Context",true,"github.com/88250/lute/parse",true,function(Tree_,ParseOption_,Tip_,oldtip_,currentLine_,currentLineLen_,offset_,column_,nextNonspace_,nextNonspaceColumn_,indent_,indented_,blank_,partiallyConsumedTab_,allClosed_,lastMatchedContainer_,rootIAL_){this.$val=this;if(arguments.length===0){this.Tree=DH.nil;this.ParseOption=DL.nil;this.Tip=CY.nil;this.oldtip=CY.nil;this.currentLine=CW.nil;this.currentLineLen=0;this.offset=0;this.column=0;this.nextNonspace=0;this.nextNonspaceColumn=0;this.indent=0;this.indented=false;this.blank=false;this.partiallyConsumedTab=false;this.allClosed=false;this.lastMatchedContainer=CY.nil;this.rootIAL=CY.nil;return;}this.Tree=Tree_;this.ParseOption=ParseOption_;this.Tip=Tip_;this.oldtip=oldtip_;this.currentLine=currentLine_;this.currentLineLen=currentLineLen_;this.offset=offset_;this.column=column_;this.nextNonspace=nextNonspace_;this.nextNonspaceColumn=nextNonspaceColumn_;this.indent=indent_;this.indented=indented_;this.blank=blank_;this.partiallyConsumedTab=partiallyConsumedTab_;this.allClosed=allClosed_;this.lastMatchedContainer=lastMatchedContainer_;this.rootIAL=rootIAL_;});AB=$pkg.InlineContext=$newType(0,$kindStruct,"parse.InlineContext",true,"github.com/88250/lute/parse",true,function(tokens_,tokensLen_,pos_,delimiters_,brackets_){this.$val=this;if(arguments.length===0){this.tokens=CW.nil;this.tokensLen=0;this.pos=0;this.delimiters=DM.nil;this.brackets=DM.nil;return;}this.tokens=tokens_;this.tokensLen=tokensLen_;this.pos=pos_;this.delimiters=delimiters_;this.brackets=brackets_;});AC=$pkg.Tree=$newType(0,$kindStruct,"parse.Tree",true,"github.com/88250/lute/parse",true,function(Root_,Context_,lexer_,inlineContext_,Name_,ID_,Box_,Path_,HPath_,Marks_,Created_,Updated_,Hash_){this.$val=this;if(arguments.length===0){this.Root=CY.nil;this.Context=DI.nil;this.lexer=DJ.nil;this.inlineContext=DK.nil;this.Name="";this.ID="";this.Box="";this.Path="";this.HPath="";this.Marks=DC.nil;this.Created=new $Int64(0,0);this.Updated=new $Int64(0,0);this.Hash="";return;}this.Root=Root_;this.Context=Context_;this.lexer=lexer_;this.inlineContext=inlineContext_;this.Name=Name_;this.ID=ID_;this.Box=Box_;this.Path=Path_;this.HPath=HPath_;this.Marks=Marks_;this.Created=Created_;this.Updated=Updated_;this.Hash=Hash_;});AD=$pkg.Options=$newType(0,$kindStruct,"parse.Options",true,"github.com/88250/lute/parse",true,function(GFMTable_,GFMTaskListItem_,GFMStrikethrough_,GFMStrikethrough1_,GFMAutoLink_,Footnotes_,HeadingID_,ToC_,Emoji_,AliasEmoji_,EmojiAlias_,EmojiSite_,VditorWYSIWYG_,VditorIR_,VditorSV_,ProtyleWYSIWYG_,InlineMath_,InlineMathAllowDigitAfterOpenMarker_,Setext_,YamlFrontMatter_,BlockRef_,FileAnnotationRef_,Mark_,KramdownBlockIAL_,KramdownSpanIAL_,Tag_,ImgPathAllowSpace_,SuperBlock_,Sup_,Sub_,GitConflict_,LinkRef_,IndentCodeBlock_,ParagraphBeginningSpace_,DataImage_,TextMark_,HTMLTag2TextMark_,Spin_){this.$val=this;if(arguments.length===0){this.GFMTable=false;this.GFMTaskListItem=false;this.GFMStrikethrough=false;this.GFMStrikethrough1=false;this.GFMAutoLink=false;this.Footnotes=false;this.HeadingID=false;this.ToC=false;this.Emoji=false;this.AliasEmoji=false;this.EmojiAlias=false;this.EmojiSite="";this.VditorWYSIWYG=false;this.VditorIR=false;this.VditorSV=false;this.ProtyleWYSIWYG=false;this.InlineMath=false;this.InlineMathAllowDigitAfterOpenMarker=false;this.Setext=false;this.YamlFrontMatter=false;this.BlockRef=false;this.FileAnnotationRef=false;this.Mark=false;this.KramdownBlockIAL=false;this.KramdownSpanIAL=false;this.Tag=false;this.ImgPathAllowSpace=false;this.SuperBlock=false;this.Sup=false;this.Sub=false;this.GitConflict=false;this.LinkRef=false;this.IndentCodeBlock=false;this.ParagraphBeginningSpace=false;this.DataImage=false;this.TextMark=false;this.HTMLTag2TextMark=false;this.Spin=false;return;}this.GFMTable=GFMTable_;this.GFMTaskListItem=GFMTaskListItem_;this.GFMStrikethrough=GFMStrikethrough_;this.GFMStrikethrough1=GFMStrikethrough1_;this.GFMAutoLink=GFMAutoLink_;this.Footnotes=Footnotes_;this.HeadingID=HeadingID_;this.ToC=ToC_;this.Emoji=Emoji_;this.AliasEmoji=AliasEmoji_;this.EmojiAlias=EmojiAlias_;this.EmojiSite=EmojiSite_;this.VditorWYSIWYG=VditorWYSIWYLine truncated
$packages["encoding"]=(function(){var $pkg={},$init,C,D,E;C=$pkg.TextMarshaler=$newType(8,$kindInterface,"encoding.TextMarshaler",true,"encoding",true,null);D=$pkg.TextUnmarshaler=$newType(8,$kindInterface,"encoding.TextUnmarshaler",true,"encoding",true,null);E=$sliceType($Uint8);C.init([{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[E,$error],false)}]);D.init([{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([E],[$error],false)}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
$packages["encoding/binary"]=(function(){var $pkg={},$init,A,B,C,D,E,O,Z,J;A=$packages["errors"];B=$packages["io"];C=$packages["math"];D=$packages["reflect"];E=$packages["sync"];O=$pkg.bigEndian=$newType(0,$kindStruct,"binary.bigEndian",true,"encoding/binary",false,function(){this.$val=this;if(arguments.length===0){return;}});Z=$sliceType($Uint8);O.ptr.prototype.Uint16=function(a){var a;$unused((1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));return((((1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1])<<16>>>16))|((((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])<<16>>>16))<<8<<16>>>16))>>>0;};O.prototype.Uint16=function(a){return this.$val.Uint16(a);};O.ptr.prototype.PutUint16=function(a,b){var a,b;$unused((1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=(((b>>>8<<16>>>16)<<24>>>24)));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=((b<<24>>>24)));};O.prototype.PutUint16=function(a,b){return this.$val.PutUint16(a,b);};O.ptr.prototype.Uint32=function(a){var a;$unused((3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]));return((((((((3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3])>>>0))|((((2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])>>>0))<<8>>>0))>>>0)|((((1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1])>>>0))<<16>>>0))>>>0)|((((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])>>>0))<<24>>>0))>>>0;};O.prototype.Uint32=function(a){return this.$val.Uint32(a);};O.ptr.prototype.PutUint32=function(a,b){var a,b;$unused((3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=(((b>>>24>>>0)<<24>>>24)));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=(((b>>>16>>>0)<<24>>>24)));(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]=(((b>>>8>>>0)<<24>>>24)));(3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]=((b<<24>>>24)));};O.prototype.PutUint32=function(a,b){return this.$val.PutUint32(a,b);};O.ptr.prototype.Uint64=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;$unused((7>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+7]));return(b=(c=(d=(e=(f=(g=(h=(new $Uint64(0,(7>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+7]))),i=$shiftLeft64((new $Uint64(0,(6>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+6]))),8),new $Uint64(h.$high|i.$high,(h.$low|i.$low)>>>0)),j=$shiftLeft64((new $Uint64(0,(5>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+5]))),16),new $Uint64(g.$high|j.$high,(g.$low|j.$low)>>>0)),k=$shiftLeft64((new $Uint64(0,(4>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+4]))),24),new $Uint64(f.$high|k.$high,(f.$low|k.$low)>>>0)),l=$shiftLeft64((new $Uint64(0,(3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]))),32),new $Uint64(e.$high|l.$high,(e.$low|l.$low)>>>0)),m=$shiftLeft64((new $Uint64(0,(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]))),40),new $Uint64(d.$high|m.$high,(d.$low|m.$low)>>>0)),n=$shiftLeft64((new $Uint64(0,(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]))),48),new $Uint64(c.$high|n.$high,(c.$low|n.$low)>>>0)),o=$shiftLeft64((new $Uint64(0,(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]))),56),new $Uint64(b.$high|o.$high,(b.$low|o.$low)>>>0));};O.prototype.Uint64=function(a){return this.$val.Uint64(a);};O.ptr.prototype.PutUint64=function(a,b){var a,b;$unused((7>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+7]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=(($shiftRightUint64(b,56).$low<<24>>>24)));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=(($shiftRightUint64(b,48).$low<<24>>>24)));(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]=(($shiftRightUint64(b,40).$low<<24>>>24)));(3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]=(($shiftRightUint64(b,32).$low<<24>>>24)));(4>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+4]=(($shiftRightUint64(b,24).$low<<24>>>24)));(5>=a.$length?($throwRuntimeError("index out of Line truncated
$packages["encoding/base64"]=(function(){var $pkg={},$init,A,B,C,D,F,H,N,O,P,Q,R,S,T,V,E,G,J,K;A=$packages["encoding/binary"];B=$packages["io"];C=$packages["strconv"];D=$pkg.Encoding=$newType(0,$kindStruct,"base64.Encoding",true,"encoding/base64",true,function(encode_,decodeMap_,padChar_,strict_){this.$val=this;if(arguments.length===0){this.encode=N.zero();this.decodeMap=O.zero();this.padChar=0;this.strict=false;return;}this.encode=encode_;this.decodeMap=decodeMap_;this.padChar=padChar_;this.strict=strict_;});F=$pkg.encoder=$newType(0,$kindStruct,"base64.encoder",true,"encoding/base64",false,function(err_,enc_,w_,buf_,nbuf_,out_){this.$val=this;if(arguments.length===0){this.err=$ifaceNil;this.enc=Q.nil;this.w=$ifaceNil;this.buf=R.zero();this.nbuf=0;this.out=S.zero();return;}this.err=err_;this.enc=enc_;this.w=w_;this.buf=buf_;this.nbuf=nbuf_;this.out=out_;});H=$pkg.CorruptInputError=$newType(8,$kindInt64,"base64.CorruptInputError",true,"encoding/base64",true,null);N=$arrayType($Uint8,64);O=$arrayType($Uint8,256);P=$sliceType($Uint8);Q=$ptrType(D);R=$arrayType($Uint8,3);S=$arrayType($Uint8,1024);T=$arrayType($Uint8,4);V=$ptrType(F);E=function(a){var a,b,c,d,e,f,g,h;if(!((a.length===64))){$panic(new $String("encoding alphabet is not 64-bytes long"));}b=0;while(true){if(!(b<a.length)){break;}if((a.charCodeAt(b)===10)||(a.charCodeAt(b)===13)){$panic(new $String("encoding alphabet contains newline character"));}b=b+(1)>>0;}c=new D.ptr(N.zero(),O.zero(),0,false);c.padChar=61;$copyString(new P(c.encode),a);d=0;while(true){if(!(d<256)){break;}(e=c.decodeMap,((d<0||d>=e.length)?($throwRuntimeError("index out of range"),undefined):e[d]=255));d=d+(1)>>0;}f=0;while(true){if(!(f<a.length)){break;}(g=c.decodeMap,h=a.charCodeAt(f),((h<0||h>=g.length)?($throwRuntimeError("index out of range"),undefined):g[h]=((f<<24>>>24))));f=f+(1)>>0;}return c;};$pkg.NewEncoding=E;D.ptr.prototype.WithPadding=function(a){var a,b,c,d;b=this;if((a===13)||(a===10)||a>255){$panic(new $String("invalid padding"));}c=0;while(true){if(!(c<64)){break;}if((((d=b.encode,((c<0||c>=d.length)?($throwRuntimeError("index out of range"),undefined):d[c]))>>0))===a){$panic(new $String("padding contained in alphabet"));}c=c+(1)>>0;}b.padChar=a;return b;};D.prototype.WithPadding=function(a){return this.$val.WithPadding(a);};D.ptr.prototype.Strict=function(){var a;a=this;a.strict=true;return a;};D.prototype.Strict=function(){return this.$val.Strict();};D.ptr.prototype.Encode=function(a,b){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if(b.$length===0){return;}$unused(c.encode);d=0;e=0;f=d;g=e;i=$imul(((h=b.$length/3,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"))),3);while(true){if(!(g<i)){break;}m=(((((((j=g+0>>0,((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j]))>>>0))<<16>>>0)|((((k=g+1>>0,((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k]))>>>0))<<8>>>0))>>>0)|(((l=g+2>>0,((l<0||l>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+l]))>>>0)))>>>0;(p=f+0>>0,((p<0||p>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+p]=(n=c.encode,o=((m>>>18>>>0)&63)>>>0,((o<0||o>=n.length)?($throwRuntimeError("index out of range"),undefined):n[o]))));(s=f+1>>0,((s<0||s>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+s]=(q=c.encode,r=((m>>>12>>>0)&63)>>>0,((r<0||r>=q.length)?($throwRuntimeError("index out of range"),undefined):q[r]))));(v=f+2>>0,((v<0||v>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+v]=(t=c.encode,u=((m>>>6>>>0)&63)>>>0,((u<0||u>=t.length)?($throwRuntimeError("index out of range"),undefined):t[u]))));(y=f+3>>0,((y<0||y>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+y]=(w=c.encode,x=(m&63)>>>0,((x<0||x>=w.length)?($throwRuntimeError("index out of range"),undefined):w[x]))));g=g+(3)>>0;f=f+(4)>>0;}z=b.$length-g>>0;if(z===0){return;}ab=(((aa=g+0>>0,((aa<0||aa>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+aa]))>>>0))<<16>>>0;if(z===2){ab=(ab|(((((ac=g+1>>0,((ac<0||ac>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+ac]))>>>0))<<8>>>0)))>>>0;}(af=f+0>>0,((af<0||af>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+af]=(ad=c.encode,ae=((ab>>>18>>>0)&63)>>>0,((ae<0||ae>=ad.length)?($throwRuntimeError("index out of range"),undefined):ad[ae]))));(ai=f+1>>0,((ai<0||ai>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+ai]=(ag=c.encode,ah=((ab>>>12>>>0)&63)>>>0,((ah<0||ah>=ag.length)?($throwRuntimeError("index out of range"),undefined):ag[ah]))));aj=z;if(aj===(2)){(am=f+2>>0,((am<0||am>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+am]=(akLine truncated
$packages["unicode/utf16"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
$packages["encoding/json"]=(function(){var $pkg={},$init,C,H,I,D,J,G,E,K,L,M,F,A,N,O,B,P,AD,AE,CA,CB,CC,CE,CG,CJ,CL,CM,DB,DI,DJ,DL,DO,DQ,DS,DU,DY,DZ,EA,EK,EV,EX,EY,EZ,FA,FB,FG,FH,FI,FJ,FK,FL,FM,FO,FU,FV,FW,FX,FZ,GA,GB,GC,GD,R,S,AF,CF,CH,CN,CQ,CR,DC,DD,ED,EQ,ER,a,b,c,Q,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BQ,BT,BU,BV,BW,BX,BZ,CI,CK,CO,CP,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DE,DF,DG,DH,DK,DM,DN,DP,DR,DT,DV,DW,DX,EB,EC,EE;C=$packages["bytes"];H=$packages["encoding"];I=$packages["encoding/base64"];D=$packages["errors"];J=$packages["fmt"];G=$packages["github.com/gopherjs/gopherjs/nosync"];E=$packages["io"];K=$packages["math"];L=$packages["reflect"];M=$packages["sort"];F=$packages["strconv"];A=$packages["strings"];N=$packages["unicode"];O=$packages["unicode/utf16"];B=$packages["unicode/utf8"];P=$pkg.tagOptions=$newType(8,$kindString,"json.tagOptions",true,"encoding/json",false,null);AD=$pkg.SyntaxError=$newType(0,$kindStruct,"json.SyntaxError",true,"encoding/json",true,function(msg_,Offset_){this.$val=this;if(arguments.length===0){this.msg="";this.Offset=new $Int64(0,0);return;}this.msg=msg_;this.Offset=Offset_;});AE=$pkg.scanner=$newType(0,$kindStruct,"json.scanner",true,"encoding/json",false,function(step_,endTop_,parseState_,err_,bytes_){this.$val=this;if(arguments.length===0){this.step=$throwNilPointerError;this.endTop=false;this.parseState=EX.nil;this.err=$ifaceNil;this.bytes=new $Int64(0,0);return;}this.step=step_;this.endTop=endTop_;this.parseState=parseState_;this.err=err_;this.bytes=bytes_;});CA=$pkg.Marshaler=$newType(8,$kindInterface,"json.Marshaler",true,"encoding/json",true,null);CB=$pkg.UnsupportedTypeError=$newType(0,$kindStruct,"json.UnsupportedTypeError",true,"encoding/json",true,function(Type_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;return;}this.Type=Type_;});CC=$pkg.UnsupportedValueError=$newType(0,$kindStruct,"json.UnsupportedValueError",true,"encoding/json",true,function(Value_,Str_){this.$val=this;if(arguments.length===0){this.Value=new L.Value.ptr(FO.nil,0,0);this.Str="";return;}this.Value=Value_;this.Str=Str_;});CE=$pkg.MarshalerError=$newType(0,$kindStruct,"json.MarshalerError",true,"encoding/json",true,function(Type_,Err_,sourceFunc_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;this.Err=$ifaceNil;this.sourceFunc="";return;}this.Type=Type_;this.Err=Err_;this.sourceFunc=sourceFunc_;});CG=$pkg.encodeState=$newType(0,$kindStruct,"json.encodeState",true,"encoding/json",false,function(Buffer_,scratch_,ptrLevel_,ptrSeen_){this.$val=this;if(arguments.length===0){this.Buffer=new C.Buffer.ptr(FA.nil,0,0);this.scratch=FI.zero();this.ptrLevel=0;this.ptrSeen=false;return;}this.Buffer=Buffer_;this.scratch=scratch_;this.ptrLevel=ptrLevel_;this.ptrSeen=ptrSeen_;});CJ=$pkg.jsonError=$newType(0,$kindStruct,"json.jsonError",true,"encoding/json",false,function(error_){this.$val=this;if(arguments.length===0){this.error=$ifaceNil;return;}this.error=error_;});CL=$pkg.encOpts=$newType(0,$kindStruct,"json.encOpts",true,"encoding/json",false,function(quoted_,escapeHTML_){this.$val=this;if(arguments.length===0){this.quoted=false;this.escapeHTML=false;return;}this.quoted=quoted_;this.escapeHTML=escapeHTML_;});CM=$pkg.encoderFunc=$newType(4,$kindFunc,"json.encoderFunc",true,"encoding/json",false,null);DB=$pkg.floatEncoder=$newType(4,$kindInt,"json.floatEncoder",true,"encoding/json",false,null);DI=$pkg.structEncoder=$newType(0,$kindStruct,"json.structEncoder",true,"encoding/json",false,function(fields_){this.$val=this;if(arguments.length===0){this.fields=new DJ.ptr(FJ.nil,false);return;}this.fields=fields_;});DJ=$pkg.structFields=$newType(0,$kindStruct,"json.structFields",true,"encoding/json",false,function(list_,nameIndex_){this.$val=this;if(arguments.length===0){this.list=FJ.nil;this.nameIndex=false;return;}this.list=list_;this.nameIndex=nameIndex_;});DL=$pkg.mapEncoder=$newType(0,$kindStruct,"json.mapEncoder",true,"encoding/json",false,function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});DO=$pkg.sliceEncoder=$newType(0,$kindStruct,"json.sliceEncoder",true,"encoding/json",false,function(arrayEnc_){this.$val=this;if(arguments.length===0){this.arrayEnc=$throwNilPointerError;return;}this.arrayEnc=arrayEnc_;});DQ=$pkg.arrayEncoder=$newType(0,$kindStruct,"json.arrayEncoder",true,"encoding/json",false,function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});DS=$pkg.ptrEncoder=$newType(0,$kindStruct,"json.ptrEncoder",true,"encoding/json",false,function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});DU=$pkg.condAddrEncoder=$newType(0,$kindStruct,"json.condAddrEncoder",true,"encoding/json",false,function(canAddrEnc_,elseEnc_){this.$val=this;if(arguments.length===0){this.canAddrEnc=$throwNilPointerError;this.elseEnc=$tLine truncated
$packages["github.com/88250/lute/render"]=(function(){var $pkg={},$init,A,M,H,F,G,I,J,K,L,B,C,D,E,N,P,R,T,AL,AM,AO,AQ,AW,BC,BE,BI,BS,BV,BY,CA,CG,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DR,DT,DU,DV,DW,X,AC,AK,AZ,CD,CF,O,Q,S,U,V,W,Y,Z,AA,AB,AD,AE,AF,AG,AH,AI,AJ,AP,AR,AS,AT,AU,AV,AX,AY,BA,BD,BF,BJ,BK,BN,BO,BP,BQ,BR,BT,BU,BW,BX,BZ,CB,CH;A=$packages["bytes"];M=$packages["encoding/json"];H=$packages["github.com/88250/lute/ast"];F=$packages["github.com/88250/lute/editor"];G=$packages["github.com/88250/lute/html"];I=$packages["github.com/88250/lute/lex"];J=$packages["github.com/88250/lute/parse"];K=$packages["github.com/88250/lute/util"];L=$packages["io"];B=$packages["strconv"];C=$packages["strings"];D=$packages["unicode"];E=$packages["unicode/utf8"];N=$pkg.VditorRenderer=$newType(0,$kindStruct,"render.VditorRenderer",true,"github.com/88250/lute/render",true,function(BaseRenderer_,commentStackDepth_){this.$val=this;if(arguments.length===0){this.BaseRenderer=CK.nil;this.commentStackDepth=0;return;}this.BaseRenderer=BaseRenderer_;this.commentStackDepth=commentStackDepth_;});P=$pkg.VditorSVRenderer=$newType(0,$kindStruct,"render.VditorSVRenderer",true,"github.com/88250/lute/render",true,function(BaseRenderer_,nodeWriterStack_,LastOut_){this.$val=this;if(arguments.length===0){this.BaseRenderer=CK.nil;this.nodeWriterStack=CT.nil;this.LastOut=CI.nil;return;}this.BaseRenderer=BaseRenderer_;this.nodeWriterStack=nodeWriterStack_;this.LastOut=LastOut_;});R=$pkg.VditorIRRenderer=$newType(0,$kindStruct,"render.VditorIRRenderer",true,"github.com/88250/lute/render",true,function(BaseRenderer_){this.$val=this;if(arguments.length===0){this.BaseRenderer=CK.nil;return;}this.BaseRenderer=BaseRenderer_;});T=$pkg.TextBundleRenderer=$newType(0,$kindStruct,"render.TextBundleRenderer",true,"github.com/88250/lute/render",true,function(FormatRenderer_,linkPrefixes_,originalLink_){this.$val=this;if(arguments.length===0){this.FormatRenderer=CX.nil;this.linkPrefixes=CJ.nil;this.originalLink=CJ.nil;return;}this.FormatRenderer=FormatRenderer_;this.linkPrefixes=linkPrefixes_;this.originalLink=originalLink_;});AL=$pkg.RendererFunc=$newType(4,$kindFunc,"render.RendererFunc",true,"github.com/88250/lute/render",true,null);AM=$pkg.ExtRendererFunc=$newType(4,$kindFunc,"render.ExtRendererFunc",true,"github.com/88250/lute/render",true,null);AO=$pkg.Options=$newType(0,$kindStruct,"render.Options",true,"github.com/88250/lute/render",true,function(SoftBreak2HardBreak_,AutoSpace_,RenderListStyle_,CodeSyntaxHighlight_,CodeSyntaxHighlightDetectLang_,CodeSyntaxHighlightInlineStyle_,CodeSyntaxHighlightLineNum_,CodeSyntaxHighlightStyleName_,VditorWYSIWYG_,VditorIR_,VditorSV_,ProtyleWYSIWYG_,KramdownBlockIAL_,KramdownSpanIAL_,SuperBlock_,ImageLazyLoading_,ChineseParagraphBeginningSpace_,Sanitize_,FixTermTypo_,Terms_,ToC_,HeadingID_,KramdownIALIDRenderName_,HeadingAnchor_,GFMTaskListItemClass_,VditorCodeBlockPreview_,VditorMathBlockPreview_,VditorHTMLBlockPreview_,LinkBase_,LinkPrefix_,NodeIndexStart_,ProtyleContenteditable_,KeepParagraphBeginningSpace_,ProtyleMarkNetImg_,Spellcheck_){this.$val=this;if(arguments.length===0){this.SoftBreak2HardBreak=false;this.AutoSpace=false;this.RenderListStyle=false;this.CodeSyntaxHighlight=false;this.CodeSyntaxHighlightDetectLang=false;this.CodeSyntaxHighlightInlineStyle=false;this.CodeSyntaxHighlightLineNum=false;this.CodeSyntaxHighlightStyleName="";this.VditorWYSIWYG=false;this.VditorIR=false;this.VditorSV=false;this.ProtyleWYSIWYG=false;this.KramdownBlockIAL=false;this.KramdownSpanIAL=false;this.SuperBlock=false;this.ImageLazyLoading="";this.ChineseParagraphBeginningSpace=false;this.Sanitize=false;this.FixTermTypo=false;this.Terms=false;this.ToC=false;this.HeadingID=false;this.KramdownIALIDRenderName="";this.HeadingAnchor=false;this.GFMTaskListItemClass="";this.VditorCodeBlockPreview=false;this.VditorMathBlockPreview=false;this.VditorHTMLBlockPreview=false;this.LinkBase="";this.LinkPrefix="";this.NodeIndexStart=0;this.ProtyleContenteditable=false;this.KeepParagraphBeginningSpace=false;this.ProtyleMarkNetImg=false;this.Spellcheck=false;return;}this.SoftBreak2HardBreak=SoftBreak2HardBreak_;this.AutoSpace=AutoSpace_;this.RenderListStyle=RenderListStyle_;this.CodeSyntaxHighlight=CodeSyntaxHighlight_;this.CodeSyntaxHighlightDetectLang=CodeSyntaxHighlightDetectLang_;this.CodeSyntaxHighlightInlineStyle=CodeSyntaxHighlightInlineStyle_;this.CodeSyntaxHighlightLineNum=CodeSyntaxHighlightLineNum_;this.CodeSyntaxHighlightStyleName=CodeSyntaxHighlightStyleName_;this.VditorWYSIWYG=VditorWYSIWYG_;this.VditorIR=VditorIR_;this.VditorSV=VditorSV_;this.ProtyleWYSIWYG=ProtyleWYSIWYG_;this.KramdownBlockIAL=KramdownBlockIAL_;this.KramdownSpanIAL=KramdownSpanIAL_;this.SuperBlock=SuperBlock_;this.ImageLazyLoading=ImageLazyLoading_;this.ChineseParagraphBeginningSpace=ChineseParagraphBeginningSpace_;this.Sanitize=Sanitize_;this.FixTermTypo=FixTermTypo_;this.Terms=Terms_;this.ToC=ToC_;this.Line truncated
$packages["github.com/88250/lute"]=(function(){var $pkg={},$init,A,M,K,D,E,F,G,L,H,I,J,O,B,C,N,P,R,Z,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AY,BA,BB,BC,BD,BE,BF,BG,BH,T,W,a,b,Q,S,AA;A=$packages["bytes"];M=$packages["errors"];K=$packages["fmt"];D=$packages["github.com/88250/lute/ast"];E=$packages["github.com/88250/lute/editor"];F=$packages["github.com/88250/lute/html"];G=$packages["github.com/88250/lute/html/atom"];L=$packages["github.com/88250/lute/lex"];H=$packages["github.com/88250/lute/parse"];I=$packages["github.com/88250/lute/render"];J=$packages["github.com/88250/lute/util"];O=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["strconv"];C=$packages["strings"];N=$packages["sync"];P=$packages["unicode"];R=$pkg.Lute=$newType(0,$kindStruct,"lute.Lute",true,"github.com/88250/lute",true,function(ParseOptions_,RenderOptions_,HTML2MdRendererFuncs_,HTML2VditorDOMRendererFuncs_,HTML2VditorIRDOMRendererFuncs_,HTML2BlockDOMRendererFuncs_,HTML2VditorSVDOMRendererFuncs_,Md2HTMLRendererFuncs_,Md2VditorDOMRendererFuncs_,Md2VditorIRDOMRendererFuncs_,Md2BlockDOMRendererFuncs_,Md2VditorSVDOMRendererFuncs_){this.$val=this;if(arguments.length===0){this.ParseOptions=AO.nil;this.RenderOptions=AC.nil;this.HTML2MdRendererFuncs=false;this.HTML2VditorDOMRendererFuncs=false;this.HTML2VditorIRDOMRendererFuncs=false;this.HTML2BlockDOMRendererFuncs=false;this.HTML2VditorSVDOMRendererFuncs=false;this.Md2HTMLRendererFuncs=false;this.Md2VditorDOMRendererFuncs=false;this.Md2VditorIRDOMRendererFuncs=false;this.Md2BlockDOMRendererFuncs=false;this.Md2VditorSVDOMRendererFuncs=false;return;}this.ParseOptions=ParseOptions_;this.RenderOptions=RenderOptions_;this.HTML2MdRendererFuncs=HTML2MdRendererFuncs_;this.HTML2VditorDOMRendererFuncs=HTML2VditorDOMRendererFuncs_;this.HTML2VditorIRDOMRendererFuncs=HTML2VditorIRDOMRendererFuncs_;this.HTML2BlockDOMRendererFuncs=HTML2BlockDOMRendererFuncs_;this.HTML2VditorSVDOMRendererFuncs=HTML2VditorSVDOMRendererFuncs_;this.Md2HTMLRendererFuncs=Md2HTMLRendererFuncs_;this.Md2VditorDOMRendererFuncs=Md2VditorDOMRendererFuncs_;this.Md2VditorIRDOMRendererFuncs=Md2VditorIRDOMRendererFuncs_;this.Md2BlockDOMRendererFuncs=Md2BlockDOMRendererFuncs_;this.Md2VditorSVDOMRendererFuncs=Md2VditorSVDOMRendererFuncs_;});Z=$pkg.ParseOption=$newType(4,$kindFunc,"lute.ParseOption",true,"github.com/88250/lute",true,null);AB=$ptrType(H.Tree);AC=$ptrType(I.Options);AD=$sliceType($Uint8);AE=$ptrType(F.Node);AF=$ptrType(D.Node);AG=$ptrType(H.Context);AH=$ptrType(L.Lexer);AI=$ptrType(H.InlineContext);AJ=$sliceType($String);AK=$sliceType(AF);AL=$ptrType(D.ListData);AM=$sliceType($Int);AN=$sliceType(AJ);AO=$ptrType(H.Options);AP=$sliceType(AE);AQ=$ptrType(AP);AR=$ptrType(F.Attribute);AS=$sliceType(AR);AT=$sliceType(G.Atom);AU=$sliceType($emptyInterface);AV=$ptrType(R);AW=$sliceType(Z);AY=$ptrType(A.Buffer);BA=$mapType($String,$emptyInterface);BB=$sliceType(D.NodeType);BC=$sliceType($Int32);BD=$mapType($String,$String);BE=$ptrType(O.Object);BF=$mapType($String,BE);BG=$mapType($String,BF);BH=$mapType(D.NodeType,I.ExtRendererFunc);R.ptr.prototype.Md2HTML=function(c){var{c,d,e,f,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d="";e=this;f=e.MarkdownStr("",c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}d=f;$s=-1;return d;}return;}var $f={$blk:R.ptr.prototype.Md2HTML,$c:true,$r,c,d,e,f,$s};return $f;};R.prototype.Md2HTML=function(c){return this.$val.Md2HTML(c);};R.ptr.prototype.SpinVditorDOM=function(c){var{c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d="";e=this;c=C.ReplaceAll(c,"<wbr>","\xE2\x80\xB8");f=e.vditorDOM2Md(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=H.Parse("",(new AD($stringToBytes(g))),e.ParseOptions);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=I.NewVditorRenderer(i,e.RenderOptions);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=k.BaseRenderer.Render();$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;d=C.ReplaceAll(($bytesToString(m)),"\xE2\x80\xB8","<wbr>");$s=-1;return d;}return;}var $f={$blk:R.ptr.prototype.SpinVditorDOM,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};R.prototype.SpinVditorDOM=function(c){return this.$val.SpinVditorDOM(c);};R.ptr.prototype.HTML2VditorDOM=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d="";e=this;g=e.HTML2Markdown(c);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(!($interfaceIsEqual($ifaceNil,i))){$s=2;continue;}$s=3;continue;case 2:j=i.Error();$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}d=j;$s=-1;return d;case 3:k=H.Parse("",(new AD($stringToBytes(h))),e.ParseOptions);$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;m=I.NewVdiLine truncated
$packages["github.com/88250/lute"]=(function(){var $pkg={},$init,A,M,K,D,E,F,G,L,H,I,J,O,B,C,N,P,R,Z,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AY,BA,BB,BC,BD,BE,BF,BG,BH,T,W,a,b,Q,S,AA;A=$packages["bytes"];M=$packages["errors"];K=$packages["fmt"];D=$packages["github.com/88250/lute/ast"];E=$packages["github.com/88250/lute/editor"];F=$packages["github.com/88250/lute/html"];G=$packages["github.com/88250/lute/html/atom"];L=$packages["github.com/88250/lute/lex"];H=$packages["github.com/88250/lute/parse"];I=$packages["github.com/88250/lute/render"];J=$packages["github.com/88250/lute/util"];O=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["strconv"];C=$packages["strings"];N=$packages["sync"];P=$packages["unicode"];R=$pkg.Lute=$newType(0,$kindStruct,"lute.Lute",true,"github.com/88250/lute",true,function(ParseOptions_,RenderOptions_,HTML2MdRendererFuncs_,HTML2VditorDOMRendererFuncs_,HTML2VditorIRDOMRendererFuncs_,HTML2BlockDOMRendererFuncs_,HTML2VditorSVDOMRendererFuncs_,Md2HTMLRendererFuncs_,Md2VditorDOMRendererFuncs_,Md2VditorIRDOMRendererFuncs_,Md2BlockDOMRendererFuncs_,Md2VditorSVDOMRendererFuncs_){this.$val=this;if(arguments.length===0){this.ParseOptions=AO.nil;this.RenderOptions=AC.nil;this.HTML2MdRendererFuncs=false;this.HTML2VditorDOMRendererFuncs=false;this.HTML2VditorIRDOMRendererFuncs=false;this.HTML2BlockDOMRendererFuncs=false;this.HTML2VditorSVDOMRendererFuncs=false;this.Md2HTMLRendererFuncs=false;this.Md2VditorDOMRendererFuncs=false;this.Md2VditorIRDOMRendererFuncs=false;this.Md2BlockDOMRendererFuncs=false;this.Md2VditorSVDOMRendererFuncs=false;return;}this.ParseOptions=ParseOptions_;this.RenderOptions=RenderOptions_;this.HTML2MdRendererFuncs=HTML2MdRendererFuncs_;this.HTML2VditorDOMRendererFuncs=HTML2VditorDOMRendererFuncs_;this.HTML2VditorIRDOMRendererFuncs=HTML2VditorIRDOMRendererFuncs_;this.HTML2BlockDOMRendererFuncs=HTML2BlockDOMRendererFuncs_;this.HTML2VditorSVDOMRendererFuncs=HTML2VditorSVDOMRendererFuncs_;this.Md2HTMLRendererFuncs=Md2HTMLRendererFuncs_;this.Md2VditorDOMRendererFuncs=Md2VditorDOMRendererFuncs_;this.Md2VditorIRDOMRendererFuncs=Md2VditorIRDOMRendererFuncs_;this.Md2BlockDOMRendererFuncs=Md2BlockDOMRendererFuncs_;this.Md2VditorSVDOMRendererFuncs=Md2VditorSVDOMRendererFuncs_;});Z=$pkg.ParseOption=$newType(4,$kindFunc,"lute.ParseOption",true,"github.com/88250/lute",true,null);AB=$ptrType(H.Tree);AC=$ptrType(I.Options);AD=$sliceType($Uint8);AE=$ptrType(F.Node);AF=$ptrType(D.Node);AG=$ptrType(H.Context);AH=$ptrType(L.Lexer);AI=$ptrType(H.InlineContext);AJ=$sliceType($String);AK=$sliceType(AF);AL=$ptrType(D.ListData);AM=$sliceType($Int);AN=$sliceType(AJ);AO=$ptrType(H.Options);AP=$sliceType(AE);AQ=$ptrType(AP);AR=$ptrType(F.Attribute);AS=$sliceType(AR);AT=$sliceType(G.Atom);AU=$sliceType($emptyInterface);AV=$ptrType(R);AW=$sliceType(Z);AY=$ptrType(A.Buffer);BA=$mapType($String,$emptyInterface);BB=$sliceType(D.NodeType);BC=$sliceType($Int32);BD=$mapType($String,$String);BE=$ptrType(O.Object);BF=$mapType($String,BE);BG=$mapType($String,BF);BH=$mapType(D.NodeType,I.ExtRendererFunc);R.ptr.prototype.Md2HTML=function(c){var{c,d,e,f,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d="";e=this;f=e.MarkdownStr("",c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}d=f;$s=-1;return d;}return;}var $f={$blk:R.ptr.prototype.Md2HTML,$c:true,$r,c,d,e,f,$s};return $f;};R.prototype.Md2HTML=function(c){return this.$val.Md2HTML(c);};R.ptr.prototype.SpinVditorDOM=function(c){var{c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d="";e=this;c=C.ReplaceAll(c,"<wbr>","\xE2\x80\xB8");f=e.vditorDOM2Md(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=H.Parse("",(new AD($stringToBytes(g))),e.ParseOptions);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=I.NewVditorRenderer(i,e.RenderOptions);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=k.BaseRenderer.Render();$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;d=C.ReplaceAll(($bytesToString(m)),"\xE2\x80\xB8","<wbr>");$s=-1;return d;}return;}var $f={$blk:R.ptr.prototype.SpinVditorDOM,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};R.prototype.SpinVditorDOM=function(c){return this.$val.SpinVditorDOM(c);};R.ptr.prototype.HTML2VditorDOM=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d="";e=this;g=e.HTML2Markdown(c);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(!($interfaceIsEqual($ifaceNil,i))){$s=2;continue;}$s=3;continue;case 2:j=i.Error();$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}d=j;$s=-1;return d;case 3:k=H.Parse("",(new AD($stringToBytes(h))),e.ParseOptions);$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;m=I.NewVdiLine truncated
$packages["github.com/88250/lute/javascript"]=(function(){var $pkg={},$init,A,B,C,D,E,F,J,K,L,M,N,O,P,Q,R,S,G,H,I;A=$packages["github.com/88250/lute"];B=$packages["github.com/88250/lute/ast"];C=$packages["github.com/88250/lute/editor"];D=$packages["github.com/88250/lute/html"];E=$packages["github.com/88250/lute/render"];F=$packages["github.com/gopherjs/gopherjs/js"];J=$ptrType(F.Object);K=$mapType($String,J);L=$mapType($String,K);M=$funcType([L],[J],false);N=$ptrType(B.Node);O=$funcType([N],[$String],false);P=$funcType([],[$String],false);Q=$funcType([$String],[$String],false);R=$mapType($String,$emptyInterface);S=$sliceType(A.ParseOption);G=function(){$global.Lute=$externalize($makeMap($String.keyFor,[{k:"Version",v:new $String("1.7.6")},{k:"New",v:new M(H)},{k:"WalkStop",v:new $Int(0)},{k:"WalkSkipChildren",v:new $Int(1)},{k:"WalkContinue",v:new $Int(2)},{k:"GetHeadingID",v:new O(E.HeadingID)},{k:"Caret",v:new $String("\xE2\x80\xB8")},{k:"NewNodeID",v:new P(B.NewNodeID)},{k:"EscapeHTMLStr",v:new Q(D.EscapeHTMLStr)},{k:"UnEscapeHTMLStr",v:new Q(D.UnescapeHTMLStr)},{k:"EChartsMindmapStr",v:new Q(E.EChartsMindmapStr)},{k:"Sanitize",v:new Q(E.Sanitize)},{k:"BlockDOM2Content",v:new Q(I)}]),R);};H=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=A.New(S.nil);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$r=c.SetJSRenderers(a);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return F.MakeWrapper(c);}return;}var $f={$blk:H,$c:true,$r,a,b,c,$s};return $f;};$pkg.New=H;I=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=A.New(S.nil);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;c.SetProtyleWYSIWYG(true);c.SetBlockRef(true);c.SetFileAnnotationRef(true);c.SetKramdownIAL(true);c.SetTag(true);c.SetSuperBlock(true);c.SetImgPathAllowSpace(true);c.SetGitConflict(true);c.SetMark(true);c.SetSup(true);c.SetSub(true);c.SetInlineMathAllowDigitAfterOpenMarker(true);c.SetFootnotes(false);c.SetToC(false);c.SetIndentCodeBlock(false);c.SetParagraphBeginningSpace(true);c.SetAutoSpace(false);c.SetHeadingID(false);c.SetSetext(false);c.SetYamlFrontMatter(false);c.SetLinkRef(false);c.SetCodeSyntaxHighlight(false);c.SetSanitize(true);d=c.BlockDOM2Content(a);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=3;case 3:return e;}return;}var $f={$blk:I,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.BlockDOM2Content=I;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){G();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
$synthesizeMethods();
$initAllLinknames();
+2
View File
@@ -330,6 +330,8 @@ func setEditor(c *gin.Context) {
util.BroadcastByType("main", "readonly", 0, "", model.Conf.Editor.ReadOnly)
}
util.MarkdownSettings = model.Conf.Editor.Markdown
ret.Data = model.Conf.Editor
}
+35 -31
View File
@@ -16,38 +16,41 @@
package conf
import "github.com/siyuan-note/siyuan/kernel/util"
type Editor struct {
FontSize int `json:"fontSize"` // 字体大小
FontSizeScrollZoom bool `json:"fontSizeScrollZoom"` // 字体大小是否支持滚轮缩放
FontFamily string `json:"fontFamily"` // 字体
CodeSyntaxHighlightLineNum bool `json:"codeSyntaxHighlightLineNum"` // 代码块是否显示行号
CodeTabSpaces int `json:"codeTabSpaces"` // 代码块中 Tab 转换空格数,配置为 0 则表示不转换
CodeLineWrap bool `json:"codeLineWrap"` // 代码块是否自动折行
CodeLigatures bool `json:"codeLigatures"` // 代码块是否连字
DisplayBookmarkIcon bool `json:"displayBookmarkIcon"` // 是否显示书签图标
DisplayNetImgMark bool `json:"displayNetImgMark"` // 是否显示网络图片角标
GenerateHistoryInterval int `json:"generateHistoryInterval"` // 生成历史时间间隔,单位:分钟
HistoryRetentionDays int `json:"historyRetentionDays"` // 历史保留天数
Emoji []string `json:"emoji"` // 常用表情
VirtualBlockRef bool `json:"virtualBlockRef"` // 是否启用虚拟引用
VirtualBlockRefExclude string `json:"virtualBlockRefExclude"` // 虚拟引用关键字排除列表
VirtualBlockRefInclude string `json:"virtualBlockRefInclude"` // 虚拟引用关键字包含列表
BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度
PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址
FullWidth bool `json:"fullWidth"` // 是否使用最大宽度
KaTexMacros string `json:"katexMacros"` // KeTex 宏定义
ReadOnly bool `json:"readOnly"` // 只读模式
EmbedBlockBreadcrumb bool `json:"embedBlockBreadcrumb"` // 嵌入块是否显示面包屑
ListLogicalOutdent bool `json:"listLogicalOutdent"` // 列表逻辑反向缩进
ListItemDotNumberClickFocus bool `json:"listItemDotNumberClickFocus"` // 单击列表项标记聚焦
FloatWindowMode int `json:"floatWindowMode"` // 浮窗触发模式,0:光标悬停,1:按住 Ctrl 悬停,2:不触发浮窗
DynamicLoadBlocks int `json:"dynamicLoadBlocks"` // 块动态数,可配置区间 [48, 1024]
Justify bool `json:"justify"` // 是否两端对齐
RTL bool `json:"rtl"` // 是否从右到左显示
Spellcheck bool `json:"spellcheck"` // 是否启用拼写检查
OnlySearchForDoc bool `json:"onlySearchForDoc"` // 是否启用 [[ 仅搜索文档块
BacklinkExpandCount int `json:"backlinkExpandCount"` // 反向链接默认展开数量
BackmentionExpandCount int `json:"backmentionExpandCount"` // 反链提及默认展开数量
FontSize int `json:"fontSize"` // 字体大小
FontSizeScrollZoom bool `json:"fontSizeScrollZoom"` // 字体大小是否支持滚轮缩放
FontFamily string `json:"fontFamily"` // 字体
CodeSyntaxHighlightLineNum bool `json:"codeSyntaxHighlightLineNum"` // 代码块是否显示行号
CodeTabSpaces int `json:"codeTabSpaces"` // 代码块中 Tab 转换空格数,配置为 0 则表示不转换
CodeLineWrap bool `json:"codeLineWrap"` // 代码块是否自动折行
CodeLigatures bool `json:"codeLigatures"` // 代码块是否连字
DisplayBookmarkIcon bool `json:"displayBookmarkIcon"` // 是否显示书签图标
DisplayNetImgMark bool `json:"displayNetImgMark"` // 是否显示网络图片角标
GenerateHistoryInterval int `json:"generateHistoryInterval"` // 生成历史时间间隔,单位:分钟
HistoryRetentionDays int `json:"historyRetentionDays"` // 历史保留天数
Emoji []string `json:"emoji"` // 常用表情
VirtualBlockRef bool `json:"virtualBlockRef"` // 是否启用虚拟引用
VirtualBlockRefExclude string `json:"virtualBlockRefExclude"` // 虚拟引用关键字排除列表
VirtualBlockRefInclude string `json:"virtualBlockRefInclude"` // 虚拟引用关键字包含列表
BlockRefDynamicAnchorTextMaxLen int `json:"blockRefDynamicAnchorTextMaxLen"` // 块引动态锚文本最大长度
PlantUMLServePath string `json:"plantUMLServePath"` // PlantUML 伺服地址
FullWidth bool `json:"fullWidth"` // 是否使用最大宽度
KaTexMacros string `json:"katexMacros"` // KeTex 宏定义
ReadOnly bool `json:"readOnly"` // 只读模式
EmbedBlockBreadcrumb bool `json:"embedBlockBreadcrumb"` // 嵌入块是否显示面包屑
ListLogicalOutdent bool `json:"listLogicalOutdent"` // 列表逻辑反向缩进
ListItemDotNumberClickFocus bool `json:"listItemDotNumberClickFocus"` // 单击列表项标记聚焦
FloatWindowMode int `json:"floatWindowMode"` // 浮窗触发模式,0:光标悬停,1:按住 Ctrl 悬停,2:不触发浮窗
DynamicLoadBlocks int `json:"dynamicLoadBlocks"` // 块动态数,可配置区间 [48, 1024]
Justify bool `json:"justify"` // 是否两端对齐
RTL bool `json:"rtl"` // 是否从右到左显示
Spellcheck bool `json:"spellcheck"` // 是否启用拼写检查
OnlySearchForDoc bool `json:"onlySearchForDoc"` // 是否启用 [[ 仅搜索文档块
BacklinkExpandCount int `json:"backlinkExpandCount"` // 反向链接默认展开数量
BackmentionExpandCount int `json:"backmentionExpandCount"` // 反链提及默认展开数量
Markdown *util.Markdown `json:"markdown"` // Markdown 配置
}
const (
@@ -83,5 +86,6 @@ func NewEditor() *Editor {
RTL: false,
BacklinkExpandCount: 8,
BackmentionExpandCount: 8,
Markdown: util.MarkdownSettings,
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20240324024901-3c1bb82cba30
github.com/88250/lute v1.7.7-0.20240425021622-7773b213b113
github.com/88250/lute v1.7.7-0.20240426034208-275376345554
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
+2 -2
View File
@@ -12,8 +12,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20240324024901-3c1bb82cba30 h1:IeE4DVRWnVpcbMj7gGZoSMiBWs3h/ihiyOmualS1Mas=
github.com/88250/gulu v1.2.3-0.20240324024901-3c1bb82cba30/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/lute v1.7.7-0.20240425021622-7773b213b113 h1:s4geGWFDTu1rF+/6p+AqODDhy7pS5KBgWGKTgPnJk70=
github.com/88250/lute v1.7.7-0.20240425021622-7773b213b113/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/lute v1.7.7-0.20240426034208-275376345554 h1:XwSEW6Jts20V/uOKBljMl2AFSPyPbpx+4pCRluKuVVk=
github.com/88250/lute v1.7.7-0.20240426034208-275376345554/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
+4
View File
@@ -267,6 +267,10 @@ func InitConf() {
if 0 > Conf.Editor.BackmentionExpandCount {
Conf.Editor.BackmentionExpandCount = 0
}
if nil == Conf.Editor.Markdown {
Conf.Editor.Markdown = &util.Markdown{}
}
util.MarkdownSettings = Conf.Editor.Markdown
if nil == Conf.Export {
Conf.Export = conf.NewExport()
+20 -2
View File
@@ -24,6 +24,21 @@ import (
"github.com/siyuan-note/logging"
)
// MarkdownSettings 运行时 Markdown 配置。
var MarkdownSettings = &Markdown{
InlineSup: false,
InlineSub: false,
InlineTag: false,
InlineMath: false,
}
type Markdown struct {
InlineSup bool `json:"inlineSup"` // 是否启用行级上标
InlineSub bool `json:"inlineSub"` // 是否启用行级下标
InlineTag bool `json:"inlineTag"` // 是否启用行级标签
InlineMath bool `json:"inlineMath"` // 是否启用行级公式
}
func NewLute() (ret *lute.Lute) {
ret = lute.New()
ret.SetTextMark(true)
@@ -36,9 +51,12 @@ func NewLute() (ret *lute.Lute) {
ret.SetImgPathAllowSpace(true)
ret.SetGitConflict(true)
ret.SetMark(true)
ret.SetSup(true)
ret.SetSub(true)
ret.SetSup(MarkdownSettings.InlineSup)
ret.SetSub(MarkdownSettings.InlineSub)
ret.SetTag(MarkdownSettings.InlineTag)
ret.SetInlineMath(MarkdownSettings.InlineMath)
ret.SetInlineMathAllowDigitAfterOpenMarker(true)
ret.SetGFMStrikethrough1(false)
ret.SetFootnotes(false)
ret.SetToC(false)
ret.SetIndentCodeBlock(false)
+1 -1
View File
@@ -38,7 +38,7 @@ import (
"github.com/siyuan-note/logging"
)
// UseSingleLineSave 是否使用单行保存 .sy 文件。
// UseSingleLineSave 是否使用单行保存 .sy 和数据库 .json 文件。
var UseSingleLineSave = true
// IsUILoaded 是否已经加载了 UI。