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

Invalid toc parsing with inline code blocks #664

Closed
sergeych opened this issue Oct 11, 2018 · 2 comments
Closed

Invalid toc parsing with inline code blocks #664

sergeych opened this issue Oct 11, 2018 · 2 comments

Comments

@sergeych
Copy link

# H1

## H2a

1. List item 1

    ~~~sh
    # Inner formatted text
    ~~~

## H2b

"# Inner formatted text" is mistakenly treated as a heading. Moreover, resulting too is not valid:

<ul id="toc">
    <li>
        <a href="#h1">H1</a>
        <ul>
            <li>
                <a href="#h2a">H2a</a>
                <ul>
                    <li>
                        <a href="#h2b">H2b</a>
                    </li>
                </ul>
            </li>
        </ul>
  • first <ul> is not closed.
nex3 added a commit to sass/sass-site that referenced this issue Nov 30, 2018
Otherwise, Redcarpet interprets them as headers when generating the
table of contents. See vmg/redcarpet#664.
@nathan-appere
Copy link

I can trigger this bug with "## Valid h2\nRandom text\n```\n# Invalid h1\n```" but not with "## Valid h2\n```\n# Invalid h1\n```".

@robin850
Copy link
Collaborator

Hello,

This is actually a duplicate of #451 which is fixed since Redcarpet 3.5.0.

I'm giving this a close ; thanks for reporting.

asaf400 pushed a commit to asaf400/ass-site that referenced this issue Apr 18, 2024
Otherwise, Redcarpet interprets them as headers when generating the
table of contents. See vmg/redcarpet#664.
asaf400 pushed a commit to asaf400/ass-site that referenced this issue Apr 18, 2024
Otherwise, Redcarpet interprets them as headers when generating the
table of contents. See vmg/redcarpet#664.
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

3 participants