Skip to content

Trailing spaces causes exception when plain-text transforming #70

@Baxxis

Description

@Baxxis

When using plain-text transformations, trailing spaces seem to throw an exception. To fix this issue, we can trim the text before issuing the transform.

This throws the exception:

var markdownTransformer = new Markdown();
markdownTransformer.ExtraMode = true; 

markdownTransformer.SummaryLength = -1;
string html = markdownTransformer.Transform(text);

Trimming the text prevents the exception:

string html = markdownTransformer.Transform(text.Trim());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions