summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/hl/languages/handlebars.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'pyssg.xyz/live/static/hl/languages/handlebars.min.js')
-rw-r--r--pyssg.xyz/live/static/hl/languages/handlebars.min.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/hl/languages/handlebars.min.js b/pyssg.xyz/live/static/hl/languages/handlebars.min.js
new file mode 100644
index 0000000..3ee9593
--- /dev/null
+++ b/pyssg.xyz/live/static/hl/languages/handlebars.min.js
@@ -0,0 +1,28 @@
+hljs.registerLanguage("handlebars",(()=>{"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={
+"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"
+},s=/\[.*?\]/,t=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,i=e("(",/'.*?'/,"|",/".*?"/,"|",s,"|",t,"|",/\.|\//,")+"),r=e("(",s,"|",t,")(?==)"),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]}]}}})()); \ No newline at end of file