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:
parent
d9ab397b88
commit
108a44f82f
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user