UNPKG

@highlightjs/cdn-assets

Version:

Syntax highlighting with language autodetection. (pre-compiled CDN assets)

12 lines 805 B
/*! `leaf` grammar compiled for Highlight.js 11.12.0 */ (()=>{var e=(()=>{"use strict";return e=>{ const a=/([A-Za-z_][A-Za-z_0-9]*)?/,n={scope:"params",begin:/\(/, end:/\)(?=\:?)/,endsParent:!0,relevance:7,contains:[{scope:"string",begin:'"', end:'"'},{scope:"keyword",match:`\\b${e.regex.either("true","false","in")}\\b` },{scope:"variable",match:/[A-Za-z_][A-Za-z_0-9]*/},{scope:"operator", match:/\+|\-|\*|\/|\%|\=\=|\=|\!|\>|\<|\&\&|\|\|/}]},t={match:[a,/(?=\()/], scope:{1:"keyword"},contains:[n]};return n.contains.unshift(t),{name:"Leaf", contains:[{match:[/#+/,a,/(?=\()/],scope:{1:"punctuation",2:"keyword"},starts:{ contains:[{match:/\:/,scope:"punctuation"}]},contains:[n]},{match:[/#+/,a,/:?/], scope:{1:"punctuation",2:"keyword",3:"punctuation"}}]}}})() ;hljs.registerLanguage("leaf",e)})();