aaronpk / XRay

X-Ray returns structured data from any URL
https://xray.p3k.app
MIT License
90 stars 15 forks source link

Multiline Mastodon posts are missing blank space #117

Closed aaronpk closed 9 months ago

aaronpk commented 1 year ago

Mastodon creates HTML that contains ...</p><p>... and it is ending up wrong in the parsed result. It should add one or two newlines to the plaintext.

aaronpk commented 1 year ago

This applies to any HTML:

<div class="h-entry"><div class="e-content"><p>Hello</p><p>World</p></div></div>
{
    "data": {
        "type": "entry",
        "content": {
            "text": "HelloWorld",
            "html": "<p>Hello</p><p>World</p>"
        },
        "post-type": "note"
    },
    "url": "",
    "code": null,
    "source-format": "mf2+html"
}