-
Notifications
You must be signed in to change notification settings - Fork 6
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
spans (from rich text) inside cells cause newlines #7
Comments
Please do! |
That's odd -- putting a span into the 'tables with complex content still get proper padding' test doesn't trigger the issue. Digging a bit. |
OK -- pasting in even a single word (on a recent Chrome, in ChromeOS) appends a <td><span style="color: rgb(170, 170, 170);">steps</span><br></td> Trying to think through if we should strip that out, strip trailing I think it's appropriate to strip |
Are you copying a part of a page and getting this rich format? Where are you pasting? It may be more of a I'm fine with stripping |
Yes, copying a single word (mid-sentence). I'd agree that it's Though if a |
I think the issue specific to |
That sounds reasonable, yeah. I didn't find tables represented in Commonmark, but is the GFM tables behavior supposed to be that HTML may be nested in tables, but Markdown may not be? For example, an unordered list can be placed inside a table in
|
And for good measure, this works:
|
Yeah, I'd avoid newlines being produced by domador in general when creating Markdown. How about a flag where we tell |
As in:
Which would render properly:
|
I'm pretty sure we need to preserve all block elements and |
By the way if you want to join ponyfoo.com/slack that'll make chatting about this stuff easier :) |
Joined, thanks. Created a test for this in #8, will take a look at coding in a bit. |
Pasting content from an external page into a table in a Woofmark instance (like this one: https://publiclab.github.io/PublicLab.Editor/examples/) often results in spans inside tables.
That becomes:
However,
td
s may often contain spans, and it seems we could figure out how to parse them gracefully at least. Here it seems like that is almost happening properly.The
span
tags are removed. I was going to suggest just that the extra newline could be stripped too. I'm happy to write a test and attempt this change?The text was updated successfully, but these errors were encountered: