diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-06-30 00:52:42 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-06-30 00:52:42 +0200 |
commit | 9bb31f57226877f78f23fb766773aa8486297bb7 (patch) | |
tree | bd0c28c27932071adaabf43dff4abcfafe221be3 /deps/highlight.js/languages/parser3.js | |
download | node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.tar.gz node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.tar.xz node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.zip |
initial commit
Diffstat (limited to '')
-rw-r--r-- | deps/highlight.js/languages/parser3.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/deps/highlight.js/languages/parser3.js b/deps/highlight.js/languages/parser3.js new file mode 100644 index 0000000..657a20b --- /dev/null +++ b/deps/highlight.js/languages/parser3.js @@ -0,0 +1,58 @@ +/* +Language: Parser3 +Requires: html-xml.js +Author: Oleg Volchkov <oleg@volchkov.net> +*/ + +this.lang = function(hljs){ + +hljs.LANGUAGES.parser3 = { + defaultMode: { + contains: ['comment', 'preprocessor', 'title', 'variable', 'keyword', 'number'], + subLanguage: 'html' + }, + case_insensitive: false, + + modes: [ + { + className: 'comment', + begin: '^#', end: '$' + }, + { + className: 'comment', + contains: ['commented_block'], + begin: '\\^rem{', end: '}', + relevance: 10 + }, + { + className: 'commented_block', + contains: ['commented_block'], + begin: '{', end: '}', + noMarkup: true + }, + { + className: 'preprocessor', + begin: '^@(?:BASE|USE|CLASS|OPTIONS)$', end: '^', + relevance: 10 + }, + { + className: 'title', + begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$', end: '^' + }, + { + className: 'variable', + begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?', end: '^' + }, + { + className: 'keyword', + begin: '\\^[\\w\\-\\.\\:]+', end: '^' + }, + { + className: 'number', + begin: '\\^#[0-9a-fA-F]+', end: '^' + }, + hljs.C_NUMBER_MODE + ] +}; + +}; |