You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what the right solution here is, but since we have a document returned by a DOMParser, anyway, perhaps we could instead generate Markdown by using NodeIterator or TreeWalker?
The text was updated successfully, but these errors were encountered:
When pasting HTML such as this:
example example
...the link will end up at the wrong place in the pasted Markdown. This appears to be because we search the
text/plain
clipboard content for the first occurrence of the linked string. This is a reasonable heuristic, but ends up with edge cases like the one above.I'm not sure what the right solution here is, but since we have a document returned by a
DOMParser
, anyway, perhaps we could instead generate Markdown by usingNodeIterator
orTreeWalker
?The text was updated successfully, but these errors were encountered: