Skip to content

Not parsing pre with child node correctly #89

Description

@TylerTemp

html string:

    <pre>
      <code>
        1
        2
        3
        4
        5
        <span>a</span>
        <span>b</span>
        <span>c</span>
      </code>
    </pre>

outputs:

<pre><code>
        1
        2
        3
        4
        5
        <span>a</span><span>b</span><span>c</span></code></pre>

expected outputs:

<pre><code>
        1
        2
        3
        4
        5
        <span>a</span>
        <span>b</span>
        <span>c</span></code></pre>

the a, b, c in pre in not in one line (as pre will keep the line break), but the parsed result puts them together

react-html-parser version: "2.0.2"

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions