diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:10:37 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:11:17 +0200 |
commit | 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch) | |
tree | 70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/highlight.js/lib/languages/crmsh.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) | |
download | wallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/crmsh.js')
-rw-r--r-- | node_modules/highlight.js/lib/languages/crmsh.js | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/node_modules/highlight.js/lib/languages/crmsh.js b/node_modules/highlight.js/lib/languages/crmsh.js new file mode 100644 index 000000000..47aac2da3 --- /dev/null +++ b/node_modules/highlight.js/lib/languages/crmsh.js @@ -0,0 +1,93 @@ +module.exports = function(hljs) { + var RESOURCES = 'primitive rsc_template'; + + var COMMANDS = 'group clone ms master location colocation order fencing_topology ' + + 'rsc_ticket acl_target acl_group user role ' + + 'tag xml'; + + var PROPERTY_SETS = 'property rsc_defaults op_defaults'; + + var KEYWORDS = 'params meta operations op rule attributes utilization'; + + var OPERATORS = '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 \\'; + + var TYPES = 'number string'; + + var LITERALS = 'Master Started Slave Stopped start promote demote stop monitor true false'; + + return { + aliases: ['crm', 'pcmk'], + case_insensitive: true, + keywords: { + keyword: KEYWORDS + ' ' + OPERATORS + ' ' + TYPES, + literal: LITERALS + }, + contains: [ + hljs.HASH_COMMENT_MODE, + { + beginKeywords: 'node', + starts: { + end: '\\s*([\\w_-]+:)?', + starts: { + className: 'title', + end: '\\s*[\\$\\w_][\\w_-]*' + } + } + }, + { + beginKeywords: RESOURCES, + starts: { + className: 'title', + end: '\\s*[\\$\\w_][\\w_-]*', + starts: { + end: '\\s*@?[\\w_][\\w_\\.:-]*' + } + } + }, + { + begin: '\\b(' + COMMANDS.split(' ').join('|') + ')\\s+', + keywords: COMMANDS, + starts: { + className: 'title', + end: '[\\$\\w_][\\w_-]*' + } + }, + { + beginKeywords: PROPERTY_SETS, + starts: { + className: 'title', + end: '\\s*([\\w_-]+:)?' + } + }, + hljs.QUOTE_STRING_MODE, + { + className: 'meta', + begin: '(ocf|systemd|service|lsb):[\\w_:-]+', + relevance: 0 + }, + { + className: 'number', + begin: '\\b\\d+(\\.\\d+)?(ms|s|h|m)?', + relevance: 0 + }, + { + className: 'literal', + begin: '[-]?(infinity|inf)', + relevance: 0 + }, + { + className: 'attr', + begin: /([A-Za-z\$_\#][\w_-]+)=/, + relevance: 0 + }, + { + className: 'tag', + begin: '</?', + end: '/?>', + relevance: 0 + } + ] + }; +};
\ No newline at end of file |