mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-05 17:14:27 -06:00
Edit regex pattern for Safari browser, fixes #478
This commit is contained in:
parent
b4c55d9075
commit
f8a66b120b
@ -1274,7 +1274,7 @@ function _toggleLink(editor, type, startEnd, url) {
|
|||||||
var end = text.slice(startPoint.ch);
|
var end = text.slice(startPoint.ch);
|
||||||
|
|
||||||
if (type == 'link') {
|
if (type == 'link') {
|
||||||
start = start.replace(/(.*(?<!!))\[/, '$1');
|
start = start.replace(/(.*)[^!]\[/, '$1');
|
||||||
} else if (type == 'image') {
|
} else if (type == 'image') {
|
||||||
start = start.replace(/(.*)!\[$/, '$1');
|
start = start.replace(/(.*)!\[$/, '$1');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user