# Discourse syntax highlighting?

**URL:** <https://discourse.julialang.org/t/discourse-syntax-highlighting/128013>\
**Category:** Meta Discussion\
**Created:** [April 12, 2025, 9:47pm UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting/128013 "2025-04-12T21:47:18Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Post date:** [April 14, 2025, 5:57pm UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting/128013/22 "2025-04-14T17:57:46Z")

</div>

I agree, there’s perhaps a couple things that might not have carried over from the blogpost (new version of hljs, maybe? or just the theme settings?) but still, quite a big improvement!

Before:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/3/73c8e0861b6c1b717526f2d430fa57b908bf2b12.png)

After:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/e/2eefdca4dac6cd2f1a0892805018d03b501d726f.png)

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [July 30, 2025, 3:55am UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting/128013/23 "2025-07-30T03:55:46Z")

</div>

Just as an update, I’ve now put this “Theme Component” into a git repository here: [GitHub - JuliaDiscourse/Unleashed-Julia-Syntax-Highlighting: Discourse Component with extended highlights definitions for Julia](https://github.com/JuliaDiscourse/Unleashed-Julia-Syntax-Highlighting). When new commits are pushed to `main`, admins here get notified of the update in the admin dashboard here and can pull them into the deployed site. PRs welcome! There’s not, AFAIK, an easy way to preview changes, unfortunately. But it’s easy enough to roll back if there’s trouble.

I’ve made a few more changes over the past few days:

- The default (unadorned) ````` syntax will try to auto-detect between `julia` and `julia-repl`. There’s generally no need to explicitly specify either one. You can, of course, still specify any of the supported languages.
- I’ve enabled support for styling the IR, LLVM, and ASM outputs from the `julia>` prompt where a `code_*` introspection function or macro is the first thing on the line.
- The REPL banner will also be tagged as a “comment”

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/e/1eb48f06fdc9214f9804bceb0bacfcbe507a3dad.png)

> **the code for the above image**
>
> ```julia-auto
> _
> _ _ _(_)_ | Documentation: https://docs.julialang.org
> (_) | (_) (_) |
> _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
> | | | | | | |/ _` | |
> | | |_| | | | (_| | | Version 1.11.6 (2025-07-09)
> _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
> |__/ |
> 
> julia> @code_typed 1+2
> CodeInfo(
> 1 ─ %1 = intrinsic Base.add_int(x, y)::Int64
> └── return %1
> ) => Int64
> 
> julia> @code_llvm 1+2
> ; Function Signature: +(Int64, Int64)
> ; @ int.jl:87 within `+`
> define i64 @"julia_+_4796"(i64 signext %"x::Int64", i64 signext %"y::Int64") #0 {
> top:
> %0 = add i64 %"y::Int64", %"x::Int64"
> ret i64 %0
> }
> 
> julia> @code_native 1+2
> .section	__TEXT,__ text,regular,pure_instructions
> .build_version macos, 15, 0
> .globl	"_julia_+_4800" ; -- Begin function julia_+_4800
> .p2align	2
> "_julia_+_4800": ; @"julia_+_4800"
> ; Function Signature: +(Int64, Int64)
> ; ┌ @ int.jl:87 within `+`
> ; %bb.0: ; %top
> ;DEBUG_VALUE: +:x <- $x0
> ;DEBUG_VALUE: +:x <- $x0
> ;DEBUG_VALUE: +:y <- $x1
> ;DEBUG_VALUE: +:y <- $x1
> add	x0, x1, x0
> ret
> ; └
> ; -- End function
> .subsections_via_symbols
> 
> ```

[Previous page](https://discourse.julialang.org/t/discourse-syntax-highlighting/128013.md?page=1)
