diff options
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/htmlbars.min.js')
-rw-r--r-- | pyssg.xyz/live/static/hl/languages/htmlbars.min.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/htmlbars.min.js b/pyssg.xyz/live/static/hl/languages/htmlbars.min.js new file mode 100644 index 0000000..6158b96 --- /dev/null +++ b/pyssg.xyz/live/static/hl/languages/htmlbars.min.js @@ -0,0 +1,30 @@ +hljs.registerLanguage("htmlbars",(()=>{"use strict";function e(...e){ +return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n +})).join("")}return n=>{const a=(n=>{const a={ +"builtin-name":"action bindattr collection component concat debugger each each-in get hash if in input link-to loc log lookup mut outlet partial query-params render template textarea unbound unless view with yield" +},t=/\[.*?\]/,s=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,i=e("(",/'.*?'/,"|",/".*?"/,"|",t,"|",s,"|",/\.|\//,")+"),r=e("(",t,"|",s,")(?==)"),l={ +begin:i,lexemes:/[\w.\/]+/},c=n.inherit(l,{keywords:{ +literal:"true false undefined null"}}),o={begin:/\(/,end:/\)/},m={ +className:"attr",begin:r,relevance:0,starts:{begin:/=/,end:/=/,starts:{ +contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,c,o]}}},d={ +contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{begin:/as\s+\|/, +keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},m,c,o],returnEnd:!0 +},g=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/\)/})}) +;o.contains=[g];const b=n.inherit(l,{keywords:a,className:"name", +starts:n.inherit(d,{end:/\}\}/})}),u=n.inherit(l,{keywords:a,className:"name" +}),h=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/\}\}/})}) +;return{name:"Handlebars", +aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0, +subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/, +skip:!0},n.COMMENT(/\{\{!--/,/--\}\}/),n.COMMENT(/\{\{!/,/\}\}/),{ +className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[b], +starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{ +className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[u]},{ +className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[b]},{ +className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{ +className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if" +},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[u]},{ +className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[h]},{ +className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[h]}]}})(n) +;return a.name="HTMLbars",n.getLanguage("handlebars")&&(a.disableAutodetect=!0), +a}})());
\ No newline at end of file |