-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
Keboo
left a comment
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.
This is really great work. One small comment then we can merge it.
build/GenerateThemesWikiMarkdown.ps1
Outdated
| 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)) { |
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 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.
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.
Alright, I've made the changes.
refactored xamlString to xamlLines and removed xamlPath var
Related to #1380
Let me know if anything is breaking :)