SoftLineBreakCharacter

MarkdownLoadOptions.SoftLineBreakCharacter property

Gets or sets a character value representing soft line break. The default value is SPACE (U+0020).

public char SoftLineBreakCharacter { get; set; }

Remarks

Note, setting this option to LineBreakChar allows you to load soft line breaks as hard line breaks.

Examples

Shows how to set soft line break character.

using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes("line1\nline2")))
{
    MarkdownLoadOptions loadOptions = new MarkdownLoadOptions();
    loadOptions.SoftLineBreakCharacter = ControlChar.LineBreakChar;
    Document doc = new Document(stream, loadOptions);

    Assert.That(doc.GetText().Trim(), Is.EqualTo("line1\u000bline2"));
}

See Also