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

Add option to render whitespace #16

Closed
Sub6Resources opened this issue Aug 31, 2018 · 4 comments
Closed

Add option to render whitespace #16

Sub6Resources opened this issue Aug 31, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request medium-priority
Milestone

Comments

@Sub6Resources
Copy link
Owner

Sub6Resources commented Aug 31, 2018

Some sources remove <br /> tags in favor of using the newline characters as line breaks when rendering. A parameter needs to be added (perhaps renderWhitespace) that defaults to false.

@Sub6Resources Sub6Resources added this to the 0.6.0 milestone Aug 31, 2018
@Sub6Resources Sub6Resources self-assigned this Aug 31, 2018
@Sub6Resources Sub6Resources added enhancement New feature or request medium-priority labels Aug 31, 2018
@Atulin
Copy link

Atulin commented Sep 2, 2018

I added flutter_html to my app today, and it renders code with \r\n as new line perfectly fine. Although it could be because each paragraph is in its own <p></p>

@Sub6Resources
Copy link
Owner Author

Yeah, a <p></p> tag would render newlines because it is a block element. This feature is more for rendering html that uses newlines instead of <br /> to display a line break (WordPress, for example replaces all <br /> tags with a newline)

@Sub6Resources
Copy link
Owner Author

Sub6Resources commented Sep 5, 2018

This is fixed in 0.5.6 (f1e5607)

(I decided to use renderNewline instead of renderWhitespace since spaces are still treated normally).

@clotodex
Copy link

clotodex commented Sep 4, 2023

For anyone having trouble finding this in newer versions:
https://github.com/Sub6Resources/flutter_html/wiki/Migration-Guides#rendernewlines-deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium-priority
Projects
Status: Done
Development

No branches or pull requests

3 participants