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 block inside list not rendered as <pre> if containing lines starting with +, - or * #1844

Closed
dynamind opened this issue Feb 12, 2016 · 16 comments

Comments

@dynamind
Copy link

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.

@moorereason
Copy link
Contributor

This is not a bug. According to the Markdown spec:

To put a code block within a list item, the code block needs to be indented twice — 8 spaces or two tabs.

@dynamind
Copy link
Author

I'm afraid you're referring to the standard syntax. The bug is in fenced code blocks, which allow us to specify the language (for client-side highlighting).

See also: https://gohugo.io/extras/highlighting/#using-client-side-highlighting

@moorereason
Copy link
Contributor

My mistake. This looks like a bug in Blackfriday.

@bep
Copy link
Member

bep commented Feb 12, 2016

What is the reference to the Blackfriday issue?

@moorereason
Copy link
Contributor

Reported upstream as blackfriday #239.

@bep
Copy link
Member

bep commented Feb 28, 2017

This issue has been automatically marked as stale because it has not been commented on for at least four months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.

This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

@bep bep added the Stale label Feb 28, 2017
@bep
Copy link
Member

bep commented Mar 1, 2017

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

@bep bep removed the Stale label Mar 10, 2017
@stale
Copy link

stale bot commented Dec 6, 2017

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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Dec 6, 2017
@moorereason moorereason removed the Stale label Dec 8, 2017
@stale
Copy link

stale bot commented Mar 8, 2018

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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Mar 8, 2018
@kaushalmodi
Copy link
Contributor

I can understand that this is not a Hugo problem. But it would be really awesome if the Go experts here can fix this problem in the Blackfriday repo. I've been noticing for quite a few months that that project is not in a very healthy development state.. This issue has been opened since 2 years, and no one in that team bothers to fix it!

@stale stale bot removed the Stale label Mar 8, 2018
@moorereason
Copy link
Contributor

@kaushalmodi,
I understand, but please don't complain about how we (or the Bf team) choose to volunteer our time. No one is getting paid for this. If you're not willing to fix it yourself, it's better to keep your complaints to yourself. None of us likes having unfixed bugs, but there's only so many hours in the day and too few contributors willing to take those hours away from their families (or whatever) and donate them to you guys.

@kaushalmodi
Copy link
Contributor

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.

@stale
Copy link

stale bot commented Jul 6, 2018

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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Jul 6, 2018
@moorereason moorereason added Keep and removed Stale labels Jul 6, 2018
@moorereason
Copy link
Contributor

This has been fixed upstream.

@kaushalmodi
Copy link
Contributor

@moorereason Awesome! Though, shouldn't this be closed after the Blackfriday ref is updated? (or does that happen automatically now?)

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants