-
Notifications
You must be signed in to change notification settings - Fork 155
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
OPS13 Export-MamlCommandHelp creates invalid XML #692
Labels
Needs-Triage
The issue is new and needs to be triaged by a work group.
Milestone
Comments
sdwheeler
added
the
Needs-Triage
The issue is new and needs to be triaged by a work group.
label
Oct 14, 2024
New repo steps. $v1path = 'D:\Git\PS-Docs\PowerShell-Docs\reference\7.4'
$v2path = '.\v2'
# Convert v1 Markdown to v2
dir $v1path -Recurse -Filter *.md |
Measure-PlatyPSMarkdown |
ForEach-Object {
if ($_.Filetype -match 'CommandHelp') {
Import-MarkdownCommandHelp -Path $_.FilePath |
Export-MarkdownCommandHelp -OutputFolder $v2path -Force
} elseif ($_.Filetype -match 'ModuleFile') {
Import-MarkdownModuleFile -Path $_.FilePath |
Export-MarkdownModuleFile -OutputFolder $v2path -Force
}
}
# Convert to MAML - Import all markdown at once and stream conversion.
dir v2\*.md -rec |
Measure-PlatyPSMarkdown |
Where-Object Filetype -match 'CommandHelp' |
Import-MarkdownCommandHelp -Path {$_.FilePath} |
Export-MamlCommandHelp -OutputFolder .\maml -Force -Verbose Error output
Now convert to MAML one folder at a time. The works without error. ## Convert to MAML - Import and convert one folder at a time.
dir v2\* -dir | ForEach-Object {
dir $_\*-*.md |
Measure-PlatyPSMarkdown |
Where-Object Filetype -match 'CommandHelp' |
Import-MarkdownCommandHelp -Path {$_.FilePath} |
Export-MamlCommandHelp -OutputFolder .\maml -Force -Verbose
} |
sdwheeler
changed the title
OPS12 Export-MamlCommandHelp creates invalid XML
OPS13 Export-MamlCommandHelp creates invalid XML
Oct 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Steps to reproduce
It looks like there is extra (incomplete) XML at the end the file.
It appears that the file ends on line 3450 but there is extra content after.
Expected behavior
Actual behavior
InvalidArgument: Cannot convert value "System.Object[]" to type "System.Xml.XmlDocument". Error: "The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type."
Error details
See attached screen shot
Environment data
Visuals
The text was updated successfully, but these errors were encountered: