You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there - really useful plugin! Running into a small issue, however. I am trying to pass a title argument to an HTML snippet, which needs to it in two place (one in <title> tag, and also in an og:title meta tag), However the plugin currently replaces only the first instance. I could specify two identical title arguments, but that's ugly. I assume this is because replace is doing basic string substitution and per docs, "A regexp with the g flag is the only case where replace() replaces more than once."
The text was updated successfully, but these errors were encountered:
@donnikitos привет!
Спасибо за плагин!
Нашел два бага и исправил локально. Возможно ты найдешь время внести изменения в код библиотеки. Это не займет много времени.
В регулярном выражении attrMatcher присутствует вот такой кусочек (?:s)?, из-за этого если имя передаваемого аттрибута начинает на 's', например 'secondItem', то первая буква s вырезается. Не очень понял зачем это правило, я его удалил и все стало работать ок.
Вторая проблема указано выше Романом и она легко исправляется заменой replace на replaceAll в этой строке data = data.replace({=$${attr[1]}}, attr[2]);
Hi there - really useful plugin! Running into a small issue, however. I am trying to pass a title argument to an HTML snippet, which needs to it in two place (one in <title> tag, and also in an og:title meta tag), However the plugin currently replaces only the first instance. I could specify two identical title arguments, but that's ugly. I assume this is because replace is doing basic string substitution and per docs, "A regexp with the g flag is the only case where replace() replaces more than once."
The text was updated successfully, but these errors were encountered: