2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-23 01:44:31 -06:00

Fixed the toggling behaviour in toggleLinks.

This commit is contained in:
Piet Schijven 2023-09-06 13:06:43 +02:00
parent d9ab397b88
commit 108a44f82f

View File

@ -1275,7 +1275,7 @@ function _toggleLink(editor, type, startEnd, url) {
var end = text.slice(startPoint.ch);
if (type == 'link') {
start = start.replace(/(.*)[^!]\[/, '$1');
start = start.replace(/(.*[^!]*)\[/, '$1');
} else if (type == 'image') {
start = start.replace(/(.*)!\[$/, '$1');
}