Skip to content

Commit 1bfe834

Browse files
authored
enh(protobuf) Support multiline comments (#2597)
1 parent c4c9772 commit 1bfe834

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Language Improvements:
4747
- enh(dart) Add `late` and `required` keywords, and `Never` built-in type (#2550) [Sam Rawlins][]
4848
- enh(erlang) Add underscore separators to numeric literals (#2554) [Sergey Prokhorov][]
4949
- enh(handlebars) Support for sub-expressions, path-expressions, hashes, block-parameters and literals (#2344) [Nils Knappmeier][]
50+
- enh(protobuf) Support multiline comments (#2597) [Pavel Evstigneev][]
5051

5152
[Josh Goebel]: https://github.com/yyyc514
5253
[Peter Plantinga]: https://github.com/pplantinga
@@ -60,6 +61,7 @@ Language Improvements:
6061
[Martin (Lhoerion)]: https://github.com/Lhoerion
6162
[Jim Mason]: https://github.com/RocketMan
6263
[lioshi]: https://github.com/lioshi
64+
[Pavel Evstigneev]: https://github.com/Paxa
6365

6466

6567
## Version 10.0.2

src/languages/protobuf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function(hljs) {
1919
hljs.QUOTE_STRING_MODE,
2020
hljs.NUMBER_MODE,
2121
hljs.C_LINE_COMMENT_MODE,
22+
hljs.C_BLOCK_COMMENT_MODE,
2223
{
2324
className: 'class',
2425
beginKeywords: 'message enum service', end: /\{/,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
<span class="hljs-comment">// A Container message</span>
12
<span class="hljs-class"><span class="hljs-keyword">message</span> <span class="hljs-title">Container</span> </span>{
23
<span class="hljs-class"><span class="hljs-keyword">message</span> <span class="hljs-title">Message</span> </span>{
34
<span class="hljs-keyword">required</span> <span class="hljs-built_in">int64</span> id = <span class="hljs-number">1</span>;
45
}
56
<span class="hljs-keyword">repeated</span> Message messages = <span class="hljs-number">1</span>;
67
<span class="hljs-keyword">optional</span> <span class="hljs-built_in">int32</span> number = <span class="hljs-number">2</span>;
78
}
9+
10+
<span class="hljs-comment">/*
11+
test multiline
12+
comment
13+
*/</span>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
// A Container message
12
message Container {
23
message Message {
34
required int64 id = 1;
45
}
56
repeated Message messages = 1;
67
optional int32 number = 2;
78
}
9+
10+
/*
11+
test multiline
12+
comment
13+
*/

0 commit comments

Comments
 (0)