Skip to content

Commit

Permalink
Fix regex for matching correct namespace (#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalchadha authored Jan 12, 2023
1 parent c03504f commit e93b600
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task<IUpdaterResult> ApplyAsync(IUpgradeContext context, ImmutableA
var oldContent = File.ReadAllText(oldAppXamlCs);
var newContent = File.ReadAllText(newAppXamlCs);
var rootNamespace = context.CurrentProject?.GetFile().GetPropertyValue("RootNamespace");
var match = Regex.Match(oldContent.Replace("\n", string.Empty), "namespace([a-zA-Z]|\\s)*");
var match = Regex.Match(oldContent.Replace("\n", string.Empty), "namespace([a-zA-Z_\\d]|\\s)*");
if (match.Success && match.Groups.Count > 0 && rootNamespace != null)
{
var namespaceToUse = match.Groups[0].Value.Trim();
Expand Down

0 comments on commit e93b600

Please sign in to comment.