Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks not rendered correctly in lists #392

Open
maueroats opened this issue Sep 21, 2017 · 2 comments
Open

Code blocks not rendered correctly in lists #392

maueroats opened this issue Sep 21, 2017 · 2 comments

Comments

@maueroats
Copy link

(Hugo 0.27.1) BlackFriday bug report

Code blocks are not rendered properly if they are members of the first item in a list.
Probably related: #326 (but lacks any detail or test case in that one).

Demo of error

  1. This will be wrong. Look at generated HTML.
      bug

The generated HTML looks like this:

<ol>
<li>This will be wrong. Look at generated HTML.
<code>haskell
  bug
</code></li>
</ol>

Demo of correct behavior

  1. With one item before it in the list, everything works.

  2. This will generate fine HTML.

      all_ok

The generated HTML looks like this:

<ol>
<li><p>With one item before it in the list, everything works.</p></li>
<li><p>This will generate fine HTML.</p>
<pre><code class="language-haskell">  all_ok
</code></pre></li>
</ol>

Thanks

@dmitshur
Copy link
Collaborator

Issue #239 is also possibly related.

@maueroats
Copy link
Author

Further minimization of example

Deleting the line "Go away" makes the code block render incorrectly. Is this a separate issue?


title: "Correct Code"
date: 2017-09-21T08:17:11-05:00
draft: false

  • With the extra space, the format is OK
    but the numbering resets.
      bug
  • Go away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants