-
Notifications
You must be signed in to change notification settings - Fork 10
Handle escaped quotes; Fix Vector return type color #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dave-artificial-agency
wants to merge
28
commits into
Joined-Forces:main
Choose a base branch
from
ai-startup:parse-escaped-quotes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Handle escaped quotes; Fix Vector return type color #12
dave-artificial-agency
wants to merge
28
commits into
Joined-Forces:main
from
ai-startup:parse-escaped-quotes
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save-dev jest @types/jest ts-jest typescript
this test is slow. but it is correct.
fix for >"The provided value 'undefined' is not a valid enum value of type CanvasTextAlign." on load. add test
remove warning
context is only used by the NodeParserRegistry, and NodeParserRegistry is already mocked.
update to match the syntax based on committed and merged code - Joined-Forces@3c694f2
source text like ``` CustomProperties Pin (.. DefaultValue="(Linkage=-1,UUID=-1,ExecutionFunction=\"\",CallbackTarget=None)" ..) ```
bd56bbd to
f8ab440
Compare
| // ([^,]*) Type 5: capture pure values e.g.: PinType.bIsConst=False | ||
| const matches = propertyData.matchAll(/([a-zA-Z0-9_.]+)\s*=\s*(("[^"]*")|(\([^)]*\))|(\w*\(\w*(?:[^(]*\([^)]*(?:"[^"]*")\))*\))|(\w*\([^)]*\([^)]*\)[^)]*\))|(\w*\([^)]*\))|([^,]*))/g); | ||
| // ("(?:[^"\\]|\\.)*\([^)]*\)") Type 6: capture struct values with escaped quotes e.g.: DefaultValue="(ExecutionFunction=\"\",CallbackTarget=None)" | ||
| const matches = propertyData.matchAll(/([a-zA-Z0-9_.]+)\s*=\s*(("(?:[^"\\]|\\.)*\([^)]*\)")|("[^"]*")|(\([^)]*\))|(\w*\(\w*(?:[^(]*\([^)]*(?:"[^"]*")\))*\))|(\w*\([^)]*\([^)]*\)[^)]*\))|(\w*\([^)]*\))|([^,]*))/g); |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this regex change , several of these regex comments are no longer accurate. I can update them, or delete them so we don't have to maintain anything if that's better.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two fixes:
\"\"in lines likeDefaultValue="(Linkage=-1,UUID=-1,ExecutionFunction=\"\",CallbackTarget=None)". This results in error messages like "Didn't parse property attribute 'CallbackTarget'. There isn't a matching parser.". The issue is not actually being able to parse and renderCallbackTarget, but rather how the PinPropertyParser handles escaped quotation marks. Add tests and a fix.Repro cases:
--
Change summary:
..
This patch may look difficult to review because it is basically an opaque change to a regex.
I have tried to add unit tests for each of the regex cases to ensure no other functionality changes or is broken.
I'm happy to add other tests or test with other nodes if you have source text or test cases you want to check.
Like other PRs, this one is based on #8 , so the first commits to add tests are the same.