mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
Is There A Way To Configure ToHtml For Not Adding '\n' At The End of Every Converted String? #533
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @napierbw51 on GitHub (May 5, 2022).
Currently using the Markdig.Markdown.ToHtml adds a '\n' character at the end of every string that is converted. This can be shown using the C# Online Compiler:

Is there a way to configure ToHtml so that the new line character isn't added? Currently, in my project I'm using .TrimEnd('\n') to remove it but I'm looking for a more graceful solution.
@xoofx commented on GitHub (May 6, 2022):
No. The code changes to support this would be significantly more involving than the
.TrimEnd('\n')on the final string.