How can I put a Liquid tag highlight in an ordered list?

前端 未结 2 1338
天涯浪人
天涯浪人 2021-01-07 10:57

This is what I want the page to be:

  1. first
  2. second
2条回答
  •  长发绾君心
    2021-01-07 11:40

    I figured out a way:

    1. first
    2. second
     : {% highlight ruby %}
    code
    code
    code
    {% endhighlight %}
    3. third
    

    This renders as a definition list though (

    and
    tags) which is probably technically incorrect use of that markup so if you're super strict about that kind of thing you might not like it, but I haven't been able to find another way without writing your own plugin to generate lists which will completely change the way you write them.

提交回复
热议问题