Skip to content

Fix two regex patterns which behaves too greedy - #613

Open
ITaluone wants to merge 1 commit into
Fallout-build:mainfrom
ITaluone:fix/patterns-too-greedy
Open

Fix two regex patterns which behaves too greedy#613
ITaluone wants to merge 1 commit into
Fallout-build:mainfrom
ITaluone:fix/patterns-too-greedy

Conversation

@ITaluone

Copy link
Copy Markdown
Collaborator

RewriteCsprojStep's telemetryVersionPropertyPattern and cryptographyXmlPackageRefPattern acting too greedy.

Why?

Leaving the \s* at the end of the pattern, it consumes every whitespace (including \r, \n) until it finds a non-whitespace (meaning everthing until the next <). This leaves the csproj file wrong indented behind.

Fixes: #612

@ITaluone
ITaluone force-pushed the fix/patterns-too-greedy branch from 1cb53b9 to e82563b Compare July 31, 2026 07:57
@ITaluone ITaluone added bug Something isn't working target/vCurrent Targets the current version labels Jul 31, 2026
@ITaluone ITaluone added this to the v10.4 milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RewriteCsprojStep has two too greedy patterns

1 participant