diff --git a/CHANGES.md b/CHANGES.md index b1413c29a5..4c31b620c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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][] diff --git a/src/languages/llvm.js b/src/languages/llvm.js index bcf90394f3..d4f670deda 100644 --- a/src/languages/llvm.js +++ b/src/languages/llvm.js @@ -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: /"/, diff --git a/test/markup/llvm/c.style.comments.expect.txt b/test/markup/llvm/c.style.comments.expect.txt new file mode 100644 index 0000000000..767f7dadcd --- /dev/null +++ b/test/markup/llvm/c.style.comments.expect.txt @@ -0,0 +1,5 @@ +/* C-style comment */ +define i32 @main() { + ; semicolon comment + ret i32 0 +} diff --git a/test/markup/llvm/c.style.comments.txt b/test/markup/llvm/c.style.comments.txt new file mode 100644 index 0000000000..9239ca2fe1 --- /dev/null +++ b/test/markup/llvm/c.style.comments.txt @@ -0,0 +1,5 @@ +/* C-style comment */ +define i32 @main() { + ; semicolon comment + ret i32 0 +}