0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

fix regexp to not include inside of curly spans

This commit is contained in:
Gazook89
2022-11-15 11:09:27 -06:00
parent ffe6272299
commit 24debfc75c

View File

@@ -139,7 +139,7 @@ const Editor = createClass({
if(line.includes('{') && line.includes('}')){
const regex = /{(?:(?=(:(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*))\1)*}/g;
const regex = /(?<!{){(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1}/g;
let match;
let blockCount = 0;
while ((match = regex.exec(line)) != null) {