mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 14:12:40 +00:00
fix regexp to not include inside of curly spans
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user