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

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

This is what I want the page to be:

  1. first
  2. second
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-07 11:39

    I haven't been able to figure out how to use the "Pygments" highlighting for code blocks inside of lists. It is possible to do a basic code block without highlighting with the following:

    1. first
    2. second
    
            code here
    
    3. third
    

    The white space placement here is important. The way that snippet of code works, there is a a blank line between 2. second and the code here line. Additionally, there are two tabs before the code here text (Eight spaces should also work).

    The output from the above using jekyll 1.0.3 with markdown: kramdown set in the _config.yml file produces:

    1. first
    2. second

       code here
      
    3. third

提交回复
热议问题