-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Extra <p> tags inside lists after code block #5291
Comments
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
@magic-lantern, do you think that russross/blackfriday#521 fixes your issue? |
Sorry for the delay in getting to this issue. Thanks for pointing out that issue. Looks like russross/blackfriday#521 references 2 separate issues. russross/blackfriday#485 and russross/blackfriday#495 are different problem than what I am experiencing. Since I reported this issue, there has been a change in behavior though - not sure if it was due to the bug you mentioned or a different one. I'm now on version:
Now it seems that list items that include a code block or are the last item in the list are wrapped in a <ol style="list-style-type: decimal">
<li>First item.</li>
<li><p>Second item:</p>
<pre class="r"><code>library(util)
#some code
myvar <- c(1, 2, 3, 4)</code></pre></li>
<li>Third item.</li>
<li><p>Fourth item.</p></li>
</ol>
<ul>
<li>First item.</li>
<li><p>Second item:</p>
<pre class="r"><code>library(util)
#some code
myvar <- c(1, 2, 3, 4)</code></pre></li>
<li>Third item.</li>
<li><p>Fourth item.</p></li>
</ul> Since the behavior now seems more consistent, I think this bug can be closed. |
@magic-lantern , @aignas |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm using
$hugo version Hugo Static Site Generator v0.49/extended darwin/amd64 BuildDate: unknown
I have the following example markdown:
For the rendered html, list items (
<li>
) before the code block are rendered as<li>text</li>
whereas list items after the code block are rendered as<li><p>text</p></li>
This different rendering occurs for both ordered and un-ordered lists.I expect that all list items are rendered the same regardless of location before or after a code block.
Is this expected behavior? Is there a configuration flag that affects this behavior? Perhaps this is a bug/feature in Blackfriday?
The text was updated successfully, but these errors were encountered: