Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#421: Don't trim whitespace during Markdown rendering #573

Merged
merged 1 commit into from
Apr 10, 2022
Merged

Conversation

mc1arke
Copy link
Owner

@mc1arke mc1arke commented Apr 8, 2022

The text renderer for the MarkdownFormatterFactory had been performing
a trim on any inputs, which caused the single whitespace entries being
added as spacers after some inline images to be removed. As the
structure of the document should be presumed to match what the
generating component requires, it's unnecessary for the renderer to
attempt to alter this structure whilst rendering to a relevant document
format. Instead, any constraints on formatting should be left to the
system rendering the generated output.

The text renderer for the `MarkdownFormatterFactory` had been performing
a `trim` on any inputs, which caused the single whitespace entries being
added as spacers after some inline images to be removed. As the
structure of the document should be presumed to match what the
generating component requires, it's unnecessary for the renderer to
attempt to alter this structure whilst rendering to a relevant document
format. Instead, any constraints on formatting should be left to the
system rendering the generated output.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@mc1arke mc1arke merged commit 5c7d391 into master Apr 10, 2022
@mc1arke mc1arke deleted the issue/421 branch April 10, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant