Skip to content

Commit d8364c0

Browse files
Update the line break character to main spacing in MAML (#781)
1 parent cdccaf4 commit d8364c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Command/ExportMamlCommandHelp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected override void EndProcessing()
102102
string mamlContent = File.ReadAllText(mamlFile.FullName, Encoding);
103103
// Replace the line break placeholder with a proper line break
104104
// This is a workaround for the issue where line breaks are not preserved in MAML files
105-
string updatedContent = mamlContent.Replace("<maml:para>__REMOVE_ME_LINE_BREAK__</maml:para>", "<maml:para>&#x20;&#x08;</maml:para>");
105+
string updatedContent = mamlContent.Replace("<maml:para>__REMOVE_ME_LINE_BREAK__</maml:para>", "<maml:para>&#x80;</maml:para>");
106106
File.WriteAllText(mamlFile.FullName, updatedContent, Encoding);
107107
WriteObject(this.InvokeProvider.Item.Get(mamlFile.FullName));
108108
}

test/Pester/ExportMamlCommandHelp.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Describe "Export-MamlCommandHelp tests" {
133133
It "Should have the line break workaround in the example code" {
134134
$m = Import-MarkdownCommandHelp -Path (Join-Path $assetDir 'get-date.md')
135135
$mamlFie = $m | Export-MamlCommandHelp -OutputFolder $outputDirectory -Force
136-
$mamlFie | Should -FileContentMatch '<maml:para>&#x20;&#x08;</maml:para>'
136+
$mamlFie | Should -FileContentMatch '<maml:para>&#x80;</maml:para>'
137137
}
138138
}
139139
}

0 commit comments

Comments
 (0)