Skip to content

Fix bogus "No other dashes should touch" errors#38

Open
native-api wants to merge 1 commit intoVhati:masterfrom
native-api:patch-1
Open

Fix bogus "No other dashes should touch" errors#38
native-api wants to merge 1 commit intoVhati:masterfrom
native-api:patch-1

Conversation

@native-api
Copy link

@native-api native-api commented Jan 5, 2026

A lazy quantifier doesn't prevent any matches, it only sets the order of trying them. And we are iterating over all possible matches. So if there are two or more XML comments in the file, the regex would eventually match a multitude of them at once, producing subj errors during verification. Not sure if this affects actual patching as well.

A possessive quantifier, on the other hand, prevents trying to find any more matches from the same "<!--" once we hit a "-->".

A lazy quantifier doesn't prevent any matches, it only sets the order of trying them. And we are iterating over all possible matches. So if there are two or more XML comments in the file, the regex would eventually match a multitude of them at once, producing subj errors during verification. Not sure if this affects actual patching as well.

A possessive quantifier, on the other hand, prevents trying to find any more matches from the same "<!--" once we hit a "-->".
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.

1 participant