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

Not parsing pre with child node correctly #89

Open
TylerTemp opened this issue Oct 10, 2021 · 0 comments
Open

Not parsing pre with child node correctly #89

TylerTemp opened this issue Oct 10, 2021 · 0 comments

Comments

@TylerTemp
Copy link

TylerTemp commented Oct 10, 2021

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"

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

1 participant