Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.31k stars 308 forks source link

Fixed the toggling behaviour in toggleLinks. #560

Open pschijven opened 10 months ago

pschijven commented 10 months ago

This pull request fixes a small issue in the toggleLinks method.

Suppose I have selected the text uri and then press Cmd+K to create a link. Then the text [uri](https://) will be generated. If I press Cmd+K again, it currently reverts the text back to [uri instead of uri.

I have made a small correction to the regular expression in the toggleLinks method to fix this problem.

erossini commented 1 week ago

I saw your code. Thank you, it fixed my issue. If you like, here the full code https://github.com/erossini/EasyMarkdownEditor

pschijven commented 3 hours ago

I saw your code. Thank you, it fixed my issue. If you like, here the full code https://github.com/erossini/EasyMarkdownEditor

I'm glad that I could be of help 👍