Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Netlify deploy and real site deploy generate different HTML when converting code examples in Markdown #454

Open
@platinumazure

Description

For a code block in Markdown, we get two different HTML patterns on Netlify vs the real site.

Netlify:

<p class="incorrect icon">(snip)</p>
<div class="language-js highlighter-rouge">
    <pre class="highlight">
        /* code */
    </pre>
</div>
<div class="language-js highlighter-rouge">
    <pre class="highlight">
        /* code */
    </pre>
</div>

Real site:

<p class="incorrect icon">(snip)</p>
<div class="language-js highlighter-rouge">
    <div>
        <pre class="highlight">
            /* code */
        </pre>
    </div>
</div>
<div class="language-js highlighter-rouge">
    <div>
        <pre class="highlight">
            /* code */
        </pre>
    </div>
</div>

Note the extra <div> between the div.language-js and the pre.highlight.

This is causing the following CSS rules to work on Netlify but fail on the real site:

p.incorrect + div > pre, p.incorrect + div + div > pre, p.incorrect + div + div + div > pre {
}

p.correct + div > pre, p.correct + div + div > pre, p.correct + div + div + div > pre {
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    infrastructureRelates to the tools used to develop the website

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions