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());
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:
Trimming the text prevents the exception: