Files
misode.github.io/assets/yaml.e8f3b9ab.js
2022-05-06 16:05:01 +00:00

3 lines
4.2 KiB
JavaScript

ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(l,u,v){var c=l("../lib/oop"),d=l("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d\s]*$/,onMatch:function(o,t,i,e){var n=/^\s*/.exec(e)[0];return i.length<1?i.push(this.next):i[0]="mlString",i.length<2?i.push(n.length):i[1]=n.length,this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlString:[{token:"indent",regex:/^\s*$/},{token:"indent",regex:/^\s*/,onMatch:function(o,t,i){var e=i[1];return e>=o.length?(this.next="start",i.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};c.inherits(a,d),u.YamlHighlightRules=a});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(l,u,v){var c=l("../range").Range,d=function(){};(function(){this.checkOutdent=function(a,o){return/^\s+$/.test(a)?/^\s*\}/.test(o):!1},this.autoOutdent=function(a,o){var t=a.getLine(o),i=t.match(/^(\s*\})/);if(!i)return 0;var e=i[1].length,n=a.findMatchingBracket({row:o,column:e});if(!n||n.row==o)return 0;var r=this.$getIndent(a.getLine(n.row));a.replace(new c(o,0,o,e-1),r)},this.$getIndent=function(a){return a.match(/^\s*/)[0]}}).call(d.prototype),u.MatchingBraceOutdent=d});ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(l,u,v){var c=l("../../lib/oop"),d=l("./fold_mode").FoldMode,a=l("../../range").Range,o=u.FoldMode=function(){};c.inherits(o,d),function(){this.getFoldWidgetRange=function(t,i,e){var n=this.indentationBlock(t,e);if(n)return n;var r=/\S/,g=t.getLine(e),s=g.search(r);if(!(s==-1||g[s]!="#")){for(var h=g.length,f=t.getLength(),x=e,m=e;++e<f;){g=t.getLine(e);var p=g.search(r);if(p!=-1){if(g[p]!="#")break;m=e}}if(m>x){var k=t.getLine(m).length;return new a(x,h,m,k)}}},this.getFoldWidget=function(t,i,e){var n=t.getLine(e),r=n.search(/\S/),g=t.getLine(e+1),s=t.getLine(e-1),h=s.search(/\S/),f=g.search(/\S/);if(r==-1)return t.foldWidgets[e-1]=h!=-1&&h<f?"start":"","";if(h==-1){if(r==f&&n[r]=="#"&&g[r]=="#")return t.foldWidgets[e-1]="",t.foldWidgets[e+1]="","start"}else if(h==r&&n[r]=="#"&&s[r]=="#"&&t.getLine(e-2).search(/\S/)==-1)return t.foldWidgets[e-1]="start",t.foldWidgets[e+1]="","";return h!=-1&&h<r?t.foldWidgets[e-1]="start":t.foldWidgets[e-1]="",r<f?"start":""}}.call(o.prototype)});ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],function(l,u,v){var c=l("../lib/oop"),d=l("./text").Mode,a=l("./yaml_highlight_rules").YamlHighlightRules,o=l("./matching_brace_outdent").MatchingBraceOutdent,t=l("./folding/coffee").FoldMode,i=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new t,this.$behaviour=this.$defaultBehaviour};c.inherits(i,d),function(){this.lineCommentStart=["#","//"],this.getNextLineIndent=function(e,n,r){var g=this.$getIndent(n);if(e=="start"){var s=n.match(/^.*[\{\(\[]\s*$/);s&&(g+=r)}return g},this.checkOutdent=function(e,n,r){return this.$outdent.checkOutdent(n,r)},this.autoOutdent=function(e,n,r){this.$outdent.autoOutdent(n,r)},this.$id="ace/mode/yaml"}.call(i.prototype),u.Mode=i});
//# sourceMappingURL=yaml.e8f3b9ab.js.map