Pygments syntax highlighting in Jekyll without starting a

后端 未结 4 1399
心在旅途
心在旅途 2021-01-21 06:18

If you use Jekyll with the Pygments syntax-highlighting package, it’s possible to write

{% highlight clojure %}
(def something :foobar)
{% endhighlight %}
         


        
4条回答
  •  时光说笑
    2021-01-21 07:07

    I think that you can use the nowrap option to prevent Pygments from wrapping the code in a div tag. So your example would become:

    In Clojure, keywords like 
    
    {% highlight clojure nowrap %}:foobar{% endhighlight %}
    
    are prepended by colons.
    

提交回复
热议问题