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/protobuf.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/protobuf.js')
-rw-r--r-- | node_modules/highlight.js/lib/languages/protobuf.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/node_modules/highlight.js/lib/languages/protobuf.js b/node_modules/highlight.js/lib/languages/protobuf.js new file mode 100644 index 000000000..3e24c7f7e --- /dev/null +++ b/node_modules/highlight.js/lib/languages/protobuf.js @@ -0,0 +1,35 @@ +module.exports = function(hljs) { + return { + keywords: { + keyword: 'package import option optional required repeated group', + built_in: 'double float int32 int64 uint32 uint64 sint32 sint64 ' + + 'fixed32 fixed64 sfixed32 sfixed64 bool string bytes', + literal: 'true false' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + { + className: 'class', + beginKeywords: 'message enum service', end: /\{/, + illegal: /\n/, + contains: [ + hljs.inherit(hljs.TITLE_MODE, { + starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title + }) + ] + }, + { + className: 'function', + beginKeywords: 'rpc', + end: /;/, excludeEnd: true, + keywords: 'rpc returns' + }, + { + begin: /^\s*[A-Z_]+/, + end: /\s*=/, excludeEnd: true + } + ] + }; +};
\ No newline at end of file |