Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Core Grammars:
- fix(yaml) - Fixed wrong escaping behavior in single quoted strings [guuido]
- enh(nim) - Add `concept` and `defer` to list of Nim keywords [Jake Leahy]
- fix(cpp) - Exclude keywords from highlighting as function calls [Eisenwave]

- fix(llvm) fixed highlighting for C-style block comments [utam-1]
New Grammars:

- added 3rd party TTCN-3 grammar to SUPPORTED_LANGUAGES [Osmocom][]
Expand Down
1 change: 1 addition & 0 deletions src/languages/llvm.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default function(hljs) {
// another language than an actual comment
hljs.COMMENT(/;\s*$/, null, { relevance: 0 }),
hljs.COMMENT(/;/, /$/),
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'string',
begin: /"/,
Expand Down
5 changes: 5 additions & 0 deletions test/markup/llvm/c.style.comments.expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<span class="hljs-comment">/* C-style comment */</span>
<span class="hljs-keyword">define</span> <span class="hljs-type">i32</span> <span class="hljs-title">@main</span>() {
<span class="hljs-comment">; semicolon comment</span>
<span class="hljs-keyword">ret</span> <span class="hljs-type">i32</span> <span class="hljs-number">0</span>
}
5 changes: 5 additions & 0 deletions test/markup/llvm/c.style.comments.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* C-style comment */
define i32 @main() {
; semicolon comment
ret i32 0
}