mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
Change markdown files to treat soft endings as hard (#11271)
This commit is contained in:
2
.github/actions/spell-check/expect.txt
vendored
2
.github/actions/spell-check/expect.txt
vendored
@@ -676,6 +676,7 @@ hangeul
|
||||
hanja
|
||||
hanselman
|
||||
hardcoded
|
||||
Hardlines
|
||||
HARDWAREINPUT
|
||||
hashcode
|
||||
hbitmap
|
||||
@@ -1809,6 +1810,7 @@ sln
|
||||
SMALLICON
|
||||
SMTO
|
||||
snd
|
||||
softline
|
||||
somil
|
||||
Soref
|
||||
SORTDOWN
|
||||
|
||||
@@ -65,9 +65,15 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
|
||||
/// </summary>
|
||||
public MarkdownPreviewHandlerControl()
|
||||
{
|
||||
// if you have a string with double space, some people view it as a new line.
|
||||
// while this is against spec, even GH supports this. Technically looks like GH just trims whitespace
|
||||
// https://github.com/microsoft/PowerToys/issues/10354
|
||||
var softlineBreak = new Markdig.Extensions.Hardlines.SoftlineBreakAsHardlineExtension();
|
||||
_extension = new HTMLParsingExtension(ImagesBlockedCallBack);
|
||||
|
||||
_pipelineBuilder = new MarkdownPipelineBuilder().UseAdvancedExtensions().UseEmojiAndSmiley().UseYamlFrontMatter().UseMathematics();
|
||||
_pipelineBuilder.Extensions.Add(_extension);
|
||||
_pipelineBuilder.Extensions.Add(softlineBreak);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user