-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
07af479
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.
I don't understand this. Could you pls explain? As I read it, either:
{0}\s*\.\s*{1}
matches and since it has nofields
, nothing happens - what's the point?fields
, the first match is usedWhich would mean this does the exact same thing as the simpler yt-dlp code. What am I missing?
07af479
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.
That was a minimal change from "not matching something preceded by
this.
".As you rightly identify, the code implements "not matching something preceded by
{_NAME_RE}.
", which is how I proposed to change the existing match; this pattern is a way to achieve(?<!...)
when the length of...
isn't fixed.Thinking about your commit I almost convinced myself that in the context the much simpler test is equivalent, or better, since we don't want to match bare
.{objname}
either , I suppose. But I didn't fully understand the rationale for just skippingthis.
originally.