Skip to content

Use lazy capture pattern in asset checker#3996

Merged
aduth merged 1 commit intomasterfrom
aduth-asset-checker-lazy-pattern
Jul 30, 2020
Merged

Use lazy capture pattern in asset checker#3996
aduth merged 1 commit intomasterfrom
aduth-asset-checker-lazy-pattern

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Jul 30, 2020

Why: To fix an issue where if there's another occurrence of a quote within the same line as a matched asset path, the path would wrongly include the text up to the last occurrence of a quote in the line.

You can see this on master:

$ make check_asset_strings 
find ./app/javascript -name "*.js*" | xargs ./scripts/check-assets
./app/javascript/app/document-capture/components/full-screen.jsx
Missing asset, close-white-alt.svg" className="full-screen-close-icon
make: *** [check_asset_strings] Error 1

With these changes, the misidentified error above should no longer be reported.

Reference:

**Why**: To fix an issue where if there's another occurrence of a quote within the same line as a matched asset path, the path would wrongly include the text up to the last occurrence of a quote in the line
@aduth aduth requested a review from ironman5366 July 30, 2020 13:29
Copy link
Copy Markdown
Contributor

@ironman5366 ironman5366 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aduth aduth merged commit 4865623 into master Jul 30, 2020
@aduth aduth deleted the aduth-asset-checker-lazy-pattern branch July 30, 2020 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants