discourse/vendor/assets/javascripts/highlightjs/languages/handlebars.min.js
Joffrey JAFFEUX f3dee5863f
FIX: pins down highlight.js to the last commit of the v9 tree (#9921)
The 10+ version has actually a bug with bash. We will wait a little bit before upgrading to 10, we should also make sure any of the breaking changes listed here https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_BREAKING_CHANGES.md are not impacting us.
2020-05-29 10:21:21 +02:00

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]}]}});