Skip to content

Commit

Permalink
Fix Unknown pin lookbehind
Browse files Browse the repository at this point in the history
  • Loading branch information
barsdeveloper committed Mar 24, 2024
1 parent 4ee76a6 commit 6a8479c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/ueblueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -3209,7 +3209,7 @@ class Grammar {
Parsernostrum.reg(
lookbehind instanceof Union
? new RegExp(`(${lookbehind.values.reduce((acc, cur) => acc + "|" + cur)})\\s*\\(\\s*`)
: lookbehind.constructor == String && lookbehind.length
: lookbehind.constructor == String && lookbehind.length > 0
? new RegExp(`(${lookbehind})\\s*\\(\\s*`)
: /()\(\s*/,
1
Expand Down Expand Up @@ -4755,7 +4755,7 @@ class UnknownPinEntity extends PinEntity {
static createGrammar() {
return Parsernostrum.seq(
Parsernostrum.reg(
new RegExp(`${Grammar.Regex.Symbol.source}\\s*\\(\\s*`),
new RegExp(`(${Grammar.Regex.Symbol.source})\\s*\\(\\s*`),
1
),
Grammar.createAttributeGrammar(this).sepBy(Grammar.commaSeparation),
Expand Down
2 changes: 1 addition & 1 deletion dist/ueblueprint.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/entity/UnknownPinEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class UnknownPinEntity extends PinEntity {
static createGrammar() {
return Parsernostrum.seq(
Parsernostrum.reg(
new RegExp(`${Grammar.Regex.Symbol.source}\\s*\\(\\s*`),
new RegExp(`(${Grammar.Regex.Symbol.source})\\s*\\(\\s*`),
1
),
Grammar.createAttributeGrammar(this).sepBy(Grammar.commaSeparation),
Expand Down
2 changes: 1 addition & 1 deletion js/serialization/Grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default class Grammar {
Parsernostrum.reg(
lookbehind instanceof Union
? new RegExp(`(${lookbehind.values.reduce((acc, cur) => acc + "|" + cur)})\\s*\\(\\s*`)
: lookbehind.constructor == String && lookbehind.length
: lookbehind.constructor == String && lookbehind.length > 0
? new RegExp(`(${lookbehind})\\s*\\(\\s*`)
: /()\(\s*/,
1
Expand Down

0 comments on commit 6a8479c

Please sign in to comment.