Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactored xamlString to xamlLines
refactored xamlString to xamlLines and removed xamlPath var
  • Loading branch information
ghostp13409 committed Dec 27, 2024
commit 97a48000c2c6790f0743da5fc7337e541728600d
10 changes: 4 additions & 6 deletions build/GenerateThemesWikiMarkdown.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ Function Main {
# Get xaml files and loop through.
Get-ChildItem $themesFullDir -Filter *.xaml |
Foreach-Object {
$xamlPath = $_.FullName
$xamlString = Get-Content -Path $xamlPath
$xamlLines = Get-Content -Path $_.FullName
$file = Select-ControlNameFromFile($_.Name)
Read-XamlStyles -xamlString $xamlString -file $file -xamlPath $xamlPath
Read-XamlStyles -xamlLines $xamlLines -file $file
}
Set-Defaults
Format-Output
Expand Down Expand Up @@ -75,9 +74,8 @@ Function Select-ControlNameFromFile {
}

Function Read-XamlStyles {
Param ($xamlString, $file, $xamlPath)
[xml]$xaml = $xamlString
$xamlLines = Get-Content $xamlPath
Param ($xamlLines, $file)
[xml]$xaml = $xamlLines
$lineNum = 1
$xaml.ResourceDictionary.Style |
Foreach-Object {
Expand Down
Loading