Closed zilvis97 closed 1 year ago
I believe the whitespace issues have been resolved on the master branch. We're hoping to push out a new release, 3.0.0-alpha.6 that contains these changes. If this is blocking, you can try using this library from the master branch until the next release comes.
Hi @Sub6Resources , do you have any rough estimation on when you are going to release it?
@ValentinVignal I've been pushing through some blocking pull requests today, so within the next few days hopefully. I'm getting married in a couple weeks so I'm pretty busy.
@Sub6Resources Nice! Congratulation! 💍 🎉
Thanks! The new version of the core library has been pushed to 3.0.0-alpha.6. The subpackages are still waiting to be released. Will you verifiy that this fixed your issue @zilvis97 and @ValentinVignal?
@Sub6Resources Sorry for late reply, I have just checked on my app with flutter_html: ^3.0.0-alpha.6
but it still looks to have the same issue.
Using Html
widget:
Using SelectableHtml
widget:
Confirmed still bug present in flutter_html: ^3.0.0-alpha.6
. This is really annoying and makes the content look terrible. IS there any workaround that we can use temporarilly?
Example rendered, when there are no leading spaces in HTML. Typically there is a new line (but no space) in HTML between the HTML h3 tag in this case before text begins.
Same problem in flutter_html: ^3.0.0-alpha.6. Do you know any althernative solution? workaround?
I believe I found a related bug. New lines are added for each \
If the \
The lines causing the issue seem to be here: https://github.com/Sub6Resources/flutter_html/blob/422593551d54704594965a2e9127dac17c88406e/lib/custom_render.dart#L140
Please see the reproduction here: https://github.com/m-skolnick/flutter_html_test/blob/main/README.md
<html>
<div>
<div>
<div>
<div>
<div>center of nested div tree</div>
</div>
</div>
</div>
</div>
bottom of nested div tree
<div></div>
<div></div>
<div></div>
<div>center of div list </div>
<div></div>
<div></div>
<div></div>
bottom of div list
</html>
Actual Display
Expected Display
@Sub6Resources It looks like it's been a few months since there were updates. Just curious if this is a package you're still actively maintaining.
Thank you for this package! It's been great so far!
@m-skolnick Yup, still maintaining! Just got sidelined for a bit. See #1247. Thanks for getting to the root of this issue!
Describe the bug:
Every closing div tag and some opening div tags acts as a new line element if they are formatted as a proper HTML. If we put all the closing tags into one line, the whitespace disappears. I tried to apply
display: Display.INLINE_BLOCK,
or some other display type to div tags, it kind of solves this issue, but then it clutters all the text into one without being able to see any paragraphs, also the alignment becomes weird with some paragraphs having some leading spaces before the start, even that is not consistent as some paragraph would have 1 leading space, some would have 2 or 3.HTML to reproduce the issue:
Html
widget configuration:Html(data: htmlData)
Expected behavior:
Should be no whitespace for every closing tag between the text
Screenshots:
Device details and Flutter/Dart/
flutter_html
versions:Stacktrace/Logcat
flutter_html: ^3.0.0-alpha.5
Additional info:
If we put all the divs together in one line with no spaces/lines separated:
it will format the text more like expected:
A picture of a cute animal (not mandatory but encouraged)