Skip to content

Pasting HTML with links can place link in the wrong place #45

Closed
@jclem

Description

@jclem

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 using NodeIterator or TreeWalker?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions