discourse/vendor/assets/javascripts/highlightjs/languages/twig.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
965 B
JavaScript

hljs.registerLanguage("twig",function(e){var t="attribute block constant cycle date dump include max min parent random range source template_from_string",a={bK:t,k:{name:t},relevance:0,c:[{cN:"params",b:"\\(",e:"\\)"}]},r={b:/\|[A-Za-z_]+:?/,k:"abs batch capitalize column convert_encoding date date_modify default escape filter first format inky_to_html inline_css join json_encode keys last length lower map markdown merge nl2br number_format raw reduce replace reverse round slice sort spaceless split striptags title trim upper url_encode",c:[a]},c=(c="apply autoescape block deprecated do embed extends filter flush for from if import include macro sandbox set use verbatim with")+" "+c.split(" ").map(function(e){return"end"+e}).join(" ");return{aliases:["craftcms"],cI:!0,sL:"xml",c:[e.C(/\{#/,/#}/),{cN:"template-tag",b:/\{%/,e:/%}/,c:[{cN:"name",b:/\w+/,k:c,starts:{eW:!0,c:[r,a],relevance:0}}]},{cN:"template-variable",b:/\{\{/,e:/}}/,c:["self",r,a]}]}});