2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-02 07:34:28 -06:00

Edit regex pattern for Safari browser, fixes #478

This commit is contained in:
Jeroen akkerman 2022-08-20 17:25:49 +02:00
parent b4c55d9075
commit f8a66b120b

View File

@ -1274,7 +1274,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');
}