discourse/vendor/assets/javascripts/highlightjs/languages/handlebars.min.js

1 line
825 B
JavaScript

hljs.registerLanguage("handlebars",function(e){var t={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield lookup"},a={b:/".*?"|'.*?'|\[.*?\]|\w+/},l=e.inherit(a,{k:t,starts:{eW:!0,relevance:0,c:[e.inherit(a,{relevance:0})]}}),i=e.inherit(l,{cN:"name"}),n=e.inherit(l,{relevance:0});return{aliases:["hbs","html.hbs","html.handlebars"],cI:!0,sL:"xml",c:[{b:/\\\{\{/,skip:!0},{b:/\\\\(?=\{\{)/,skip:!0},e.C(/\{\{!--/,/--\}\}/),e.C(/\{\{!/,/\}\}/),{cN:"template-tag",b:/\{\{\{\{(?!\/)/,e:/\}\}\}\}/,c:[i],starts:{e:/\{\{\{\{\//,rE:!0,sL:"xml"}},{cN:"template-tag",b:/\{\{\{\{\//,e:/\}\}\}\}/,c:[i]},{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[i]},{cN:"template-variable",b:/\{\{\{/,e:/\}\}\}/,k:t,c:[n]},{cN:"template-variable",b:/\{\{/,e:/\}\}/,k:t,c:[n]}]}});