# Discourse syntax highlighting options

**URL:** https://discourse.julialang.org/t/discourse-syntax-highlighting-options/54288
**Category:** Meta Discussion
**Created:** [January 30, 2021, 5:41pm UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting-options/54288 "2021-01-30T17:41:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![FPGro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fpgro/32/20822_2.png) [@FPGro](https://discourse.julialang.org/u/FPGro)
#### Post date: [January 30, 2021, 5:41pm UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting-options/54288/1 "2021-01-30T17:41:31Z")

</div>

Hi folks,

I have no clue how this platform, especially the syntax highlighting for block quotes here, works under the hood and how configurable it is, so I thought I’d ask right away:

What are the options for block quote highlighting (or where can I find them) and is there a highlighting for `@code_warntype` like output? If not, how hard would it be to make this possible?

I’m asking because of posts that sometimes appear in discussions mainly about code optimisation like this post:

> [@Writing a fast nlp tokenizer in Julia](https://discourse.julialang.org/t/writing-a-fast-nlp-tokenizer-in-julia/54176/7):
>
> Have you looked at the literature to see if there are some clever tricks? I’ve read some literature but not a lot. Most of them leave these things as an implementation detail. e.g. this one ([pdf](https://www.aclweb.org/anthology/2020.findings-emnlp.414.pdf)): [afbeelding]. Also I’m not aiming for the absolute fastest code, but your ideas have sped things up already by quite a bit. For reference: do you know at how fast we’re aiming at? We could do a little profiling to identify bottlenecks and see if we can make this run. No, I’ve got no real intu…

Which would be much easier to grasp if the highlighting would reflect what `@code_warntype` does.

Thanks in advance

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [January 30, 2021, 6:27pm UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting-options/54288/2 "2021-01-30T18:27:50Z")

</div>

The highlighting is done with [highlight.js](https://highlightjs.org/). You can probably write a custom “julia-code-warntype” plugin, but to me it looks like the regular julia highlighter does a pretty good job with `@code_warntype` output?

---

<div class="post-metadata">

### Author: ![FPGro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fpgro/32/20822_2.png) [@FPGro](https://discourse.julialang.org/u/FPGro)
#### Post date: [January 30, 2021, 7:20pm UTC](https://discourse.julialang.org/t/discourse-syntax-highlighting-options/54288/3 "2021-01-30T19:20:43Z")

</div>

Oh it does a magnificent job at discerning code from type annotations and those pseudo-nodes. The thing that is missing, and that separates `@code_typed` from `@code_warntype` is the highlighting of non-leaf types: `Union`s with `Missing` or `Nothing` in yellow and all other `Union`s (and `Any`) in red.  
Unfortunately, I have no experience with Javascript whatsoever, so that’ll have to wait.
