discourse/vendor/assets/javascripts/highlightjs/languages/crmsh.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
1.1 KiB
JavaScript

hljs.registerLanguage("crmsh",function(e){var t="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{aliases:["crm","pcmk"],cI:!0,k:{keyword:"params meta operations op rule attributes utilization read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\ number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},c:[e.HCM,{bK:"node",starts:{e:"\\s*([\\w_-]+:)?",starts:{cN:"title",e:"\\s*[\\$\\w_][\\w_-]*"}}},{bK:"primitive rsc_template",starts:{cN:"title",e:"\\s*[\\$\\w_][\\w_-]*",starts:{e:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{b:"\\b("+t.split(" ").join("|")+")\\s+",k:t,starts:{cN:"title",e:"[\\$\\w_][\\w_-]*"}},{bK:"property rsc_defaults op_defaults",starts:{cN:"title",e:"\\s*([\\w_-]+:)?"}},e.QSM,{cN:"meta",b:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{cN:"number",b:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{cN:"literal",b:"[-]?(infinity|inf)",relevance:0},{cN:"attr",b:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{cN:"tag",b:"</?",e:"/?>",relevance:0}]}});