Skip to content

Feature: Undo insert link #384

Description

@sevonj

Is your feature request related to a problem? Please describe.
#375 added action to insert markdown links. All other formatting actions so far support undo, and it'd be nice if links did it as well.

Links get a little bit more complicated than headings or inline formatting, but at least empty links are easy to handle.

Describe the solution you'd like

  • If word around cursor is [](), the action removes it instead of doing [[]()]().
  • If word around cursor is [word](), the action removes it, leaving word.

Describe alternatives you've considered
-

Additional context
There's of course more cases to handle, such as
[multiple words with spaces]() => multiple words with spaces and
[good ol' XcQ](https://www.youtube.com/watch?v=dQw4w9WgXcQ) (what to do with url?),
but I'll not include them in the scope

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions