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

Divs should not be converted as <p> #24

Closed
tiberiuichim opened this issue Mar 14, 2023 · 1 comment
Closed

Divs should not be converted as <p> #24

tiberiuichim opened this issue Mar 14, 2023 · 1 comment

Comments

@tiberiuichim
Copy link

For a fragment such as <div><h2>hello</h2></div> the result should not be the equivalent of <p><h2>hello</h2></p>.

@davisagli
Copy link
Member

@tiberiuichim What are the steps to reproduce? I tried posting this:

{"html": "<div><h2>hello</h2></div>"}

And got this response:

{
    "data": [
        {
            "@type": "slate",
            "value": [
                {
                    "type": "h2",
                    "children": [
                        {
                            "text": "hello"
                        }
                    ]
                }
            ],
            "plaintext": "hello"
        }
    ]
}

Which looks fine.

It's quite possible the div isn't being handled correctly in some specific context, but then we need a complete example to investigate it. I'll close this since we have an example in #27 which shows some related issues with divs.

@davisagli davisagli closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2023
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

2 participants