Skip to content

Updated script to include file links (Issue#1380) #3750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

ghostp13409
Copy link
Contributor

Related to #1380

Let me know if anything is breaking :)

@Keboo Keboo added this to the 5.2.0 milestone Dec 27, 2024
Copy link
Member

@Keboo Keboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great work. One small comment then we can merge it.

Comment on lines 78 to 90
Param ($xamlString, $file, $xamlPath)
[xml]$xaml = $xamlString
$xaml.ResourceDictionary.Style |
Foreach-Object {
$xamlLines = Get-Content $xamlPath
$lineNum = 1
$xaml.ResourceDictionary.Style |
Foreach-Object {
Write-Output $_
# Get line number by Key or TargetType
$styleLineNumber = $null
$searchKey = if ($_.Key) { $_.Key } else { $_.TargetType }

for ($i = 0; $i -lt $xamlLines.Length; $i++) {
if ($xamlLines[$i] -match [regex]::Escape($searchKey)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think $xamlPath is not needed as I believe you already have the content in $xamlString though this variable could probably be renamed to be $xamlLines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I've made the changes.

refactored xamlString to xamlLines and removed xamlPath var
@Keboo Keboo enabled auto-merge (squash) December 27, 2024 20:42
@Keboo Keboo merged commit d065de9 into MaterialDesignInXAML:master Dec 27, 2024
2 checks passed
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.

2 participants