# Any library for syntax highlight of julia code for web sites?

**URL:** https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871
**Category:** General Usage
**Tags:** question
**Created:** [February 3, 2017, 3:23pm UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871 "2017-02-03T15:23:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [February 3, 2017, 3:23pm UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/1 "2017-02-03T15:23:32Z")

</div>

Hello, I use [DokuWiki](https://www.dokuwiki.org) on my website, that in turns use the [GeSHi](http://qbnz.com/highlighter/) Generic Syntax Highlighter. The problem is that Julia is not supported on that library.  
Do you know of syntax highlighting libraries for the web with Julia support ?

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [February 3, 2017, 3:50pm UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/2 "2017-02-03T15:50:20Z")

</div>

I did try pushing this [unofficial GeSHi plugin](https://raw.githubusercontent.com/john9631/JuliaDocs/master/julia.php) to [DoKuWikl root]/vendor/easybook/geshi/geshi but it’s still not working…

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 3, 2017, 4:20pm UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/3 "2017-02-03T16:20:49Z")

</div>

This should work.

> **[Wordpress Julia Syntax Highlighting - Stochastic Lifestyle](http://www.stochasticlifestyle.com/wordpress-julia-syntax-highlighting/)**
>
> using Julia print("Test for Julia") A = \[0 1 ; 0 1\]; Syntax highlighting in Julia exists? Yes, you can make it work even though no plugins currently support it. The way I was able to get it to work was to use the WP-GeSHi-Highlight WordPress plugin...

Edit: looks like you may have tried that?

---

<div class="post-metadata">

### Author: ![amellnik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amellnik/32/137_2.png) [@amellnik](https://discourse.julialang.org/u/amellnik)
#### Post date: [February 3, 2017, 4:42pm UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/4 "2017-02-03T16:42:47Z")

</div>

[Prism](http://prismjs.com/#languages) has a Julia language definition and works pretty well.

---

<div class="post-metadata">

### Author: ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)
#### Post date: [February 7, 2017, 8:50am UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/5 "2017-02-07T08:50:45Z")

</div>

yes, and now I know why it wasn’t working.  
Some bug in Geshi engine doesn’t allow multiline comments in the Julia format #= … #= (if you use #=… #= wherever in the page, the whole page is not syntax highlighted… yes, I did try setting ‘COMMENT\_MULTI’ =\> array(‘#=’ =\> ‘=#’), in the Geshi Julia plug-in file).  
As Geshi seems pretty a dead project, I would just hope DokuWiki would update its default syntax highlight engine to something more modern (e.g. prism, as suggested by @amellnik) …

thanks

---

<div class="post-metadata">

### Author: ![bicycle1885](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bicycle1885/32/107_2.png) [@bicycle1885](https://discourse.julialang.org/u/bicycle1885)
#### Post date: [February 7, 2017, 9:44am UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/6 "2017-02-07T09:44:36Z")

</div>

[highlight.js](https://highlightjs.org/) supports Julia because I wrote the Julia support 😉.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [February 7, 2017, 1:19pm UTC](https://discourse.julialang.org/t/any-library-for-syntax-highlight-of-julia-code-for-web-sites/1871/7 "2017-02-07T13:19:38Z")

</div>

[http://pygments.org/](http://pygments.org/) has Julia support
