This repository has been archived by the owner on Jul 27, 2024. It is now read-only.
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.
Add AssetSizeJavascript Check #194
Add AssetSizeJavascript Check #194
Changes from all commits
96f86f1
beb659d
0a3b73c
5417714
cc72ff4
c538e04
1dbd0c8
5ab8004
e282c2f
c37dd29
d88e19f
28782c1
74511bd
e29b60c
4b96d1a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
IIUC what this code does, you're looking for
String#scan
: https://ruby-doc.org/core-3.0.0/String.html#method-i-scanThere 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.
I really want the MatchData since I'm using
match.begin(:src)
to get the index of the src inside the string. And scan gives me strings IIRC.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.
You can use
https://ruby-doc.org/core-3.0.0/Regexp.html#method-c-last_match
. But you have to usescan
w/ a block.