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/ini.js | |
download | node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.tar.gz node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.tar.xz node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.zip |
initial commit
Diffstat (limited to 'deps/highlight.js/languages/ini.js')
-rw-r--r-- | deps/highlight.js/languages/ini.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/deps/highlight.js/languages/ini.js b/deps/highlight.js/languages/ini.js new file mode 100644 index 0000000..b128a82 --- /dev/null +++ b/deps/highlight.js/languages/ini.js @@ -0,0 +1,44 @@ +/* +Language: Ini +*/ + +this.lang = function(hljs){ + +hljs.LANGUAGES.ini = +{ + case_insensitive: true, + defaultMode: { + contains: ['comment', 'title', 'setting'], + illegal: '[^\\s]' + }, + modes: [ + { + className: 'comment', + begin: ';', end: '$' + }, + { + className: 'title', + begin: '\\[', end: '\\]' + }, + { + className: 'setting', + begin: '^[a-z0-9_\\[\\]]+[ \\t]*=[ \\t]*', end: '$', + contains: ['value'] + }, + { + className: 'value', + begin: '^', endsWithParent: true, + contains: ['string', 'number'], + lexems: [hljs.IDENT_RE], + keywords: {'on': 1, 'off': 1, 'true': 1, 'false': 1, 'yes': 1, 'no': 1} + }, + hljs.QUOTE_STRING_MODE, + hljs.BACKSLASH_ESCAPE, + { + className: 'number', + begin: '\\d+', end: '^' + } + ] +}; + +}; |