Skip to content

Commit 9aa4e73

Browse files
authored
add llvm highlighting (#8)
* add llvm highlighting * pretty trailing commas
1 parent fa80d0b commit 9aa4e73

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

javascripts/discourse/api-initializers/theme-initializer.gjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,28 @@ function juliaRepl(hljs) {
655655
return {
656656
name: "Julia REPL",
657657
contains: [
658+
{
659+
className: "meta.prompt",
660+
begin: /^julia>(?=\s+@?code_llvm\b)/,
661+
relevance: 15,
662+
starts: {
663+
end: /^(?=julia>)/,
664+
returnBegin: true,
665+
contains: [
666+
{
667+
// The Julia command line itself
668+
begin: /\s+@?code_llvm/,
669+
end: /^(?![ ]{6})/,
670+
subLanguage: "julia",
671+
},
672+
{
673+
// The LLVM IR output that follows
674+
end: /^(?=julia>)/,
675+
subLanguage: "llvm",
676+
},
677+
],
678+
},
679+
},
658680
{
659681
className: "meta.prompt",
660682
begin: /^julia>/,

0 commit comments

Comments
 (0)