1 !function(e){var a=/\{\{\{[\w\W]+?\}\}\}|\{\{[\w\W]+?\}\}/g;e.languages.handleba
rs=e.languages.extend("markup",{handlebars:{pattern:a,inside:{delimiter:{pattern
:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(\\?.)+?\1/,number:/\b-
?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/,"boolean":/\b(true|false)\b/,block:{pa
ttern:/^(\s*~?\s*)[#\/]\S+/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\
[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\w\W]+/}},punctuation:/[!"#%&'
()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/}}}),e
.languages.insertBefore("handlebars","tag",{"handlebars-comment":{pattern:/\{\{!
[\w\W]*?\}\}/,alias:["handlebars","comment"]}}),e.hooks.add("before-highlight",f
unction(e){"handlebars"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.cod
e=e.code.replace(a,function(a){return e.tokenStack.push(a),"___HANDLEBARS"+e.tok
enStack.length+"___"}))}),e.hooks.add("before-insert",function(e){"handlebars"==
=e.language&&(e.code=e.backupCode,delete e.backupCode)}),e.hooks.add("after-high
light",function(a){if("handlebars"===a.language){for(var n,t=0;n=a.tokenStack[t]
;t++)a.highlightedCode=a.highlightedCode.replace("___HANDLEBARS"+(t+1)+"___",e.h
ighlight(n,a.grammar,"handlebars"));a.element.innerHTML=a.highlightedCode}})}(Pr
ism); | 1 !function(e){var a=/\{\{\{[\w\W]+?\}\}\}|\{\{[\w\W]+?\}\}/g;e.languages.handleba
rs=e.languages.extend("markup",{handlebars:{pattern:a,inside:{delimiter:{pattern
:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(\\?.)*?\1/,number:/\b-
?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?)\b/,"boolean":/\b(true|false)\b/,block:
{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},
brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\w\W]+/}},
punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\
[\\\]^`{|}~\s]+/}}}),e.languages.insertBefore("handlebars","tag",{"handlebars-co
mment":{pattern:/\{\{![\w\W]*?\}\}/,alias:["handlebars","comment"]}}),e.hooks.ad
d("before-highlight",function(e){"handlebars"===e.language&&(e.tokenStack=[],e.b
ackupCode=e.code,e.code=e.code.replace(a,function(a){return e.tokenStack.push(a)
,"___HANDLEBARS"+e.tokenStack.length+"___"}))}),e.hooks.add("before-insert",func
tion(e){"handlebars"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),e
.hooks.add("after-highlight",function(a){if("handlebars"===a.language){for(var n
,t=0;n=a.tokenStack[t];t++)a.highlightedCode=a.highlightedCode.replace("___HANDL
EBARS"+(t+1)+"___",e.highlight(n,a.grammar,"handlebars").replace(/\$/g,"$$$$"));
a.element.innerHTML=a.highlightedCode}})}(Prism); |