hugo: Code block inside list not rendered as
 if containing lines starting with +, - or *

In Hugo 0.14/0.15 I noticed that code blocks are not rendered correctly if they contain lines starting with +, - or * and are nested inside a list.

Example:

1. Some list item

    ```plain
    + this doesn't work
    ```

The generated HTML is:

<ol>
    <li><p>Some list item</p>
    <p>```plain</p>
    <ul>
        <li>this doesn&rsquo;t work
        ```</li>
    </ul></li>
</ol>

Removing or replacing the offending character, prepending 4 spaces, or taking the block out of the list solves it.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

I am a heavy open-source contributor too. Sorry, I’m just feeling helpless here as I don’t know Go… and I fear the impact that the lack of maintenance on Bf project will have on Hugo… that’s all.

and donate them to you guys.

Just to clarify, I am not one of “you guys”. I contribute a lot of my free time to open source projects, actively contributing, helping folks, etc.

That said, I won’t talk about this in Hugo issues any more.