mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 23:05:30 +08:00

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.
1 line
2.2 KiB
JavaScript
1 line
2.2 KiB
JavaScript
hljs.registerLanguage("d",function(e){var a="(0|[1-9][\\d_]*)",d="("+a+"|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",t="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",_={cN:"number",b:"\\b"+d+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},r={cN:"number",b:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+d+"(i|[fF]i|Li))",relevance:0},i={cN:"string",b:"'("+t+"|.)",e:"'",i:"."},n={cN:"string",b:'"',c:[{b:t,relevance:0}],e:'"[cwd]?'},c=e.C("\\/\\+","\\+\\/",{c:["self"],relevance:10});return{l:e.UIR,k:{keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},c:[e.CLCM,e.CBCM,c,{cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},n,{cN:"string",b:'[rq]"',e:'"[cwd]?',relevance:5},{cN:"string",b:"`",e:"`[cwd]?"},{cN:"string",b:'q"\\{',e:'\\}"'},r,_,i,{cN:"meta",b:"^#!",e:"$",relevance:5},{cN:"meta",b:"#(line)",e:"$",relevance:5},{cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}); |