8000 BRs are not handled correctly in shrinkWrap mode · Issue #731 · Sub6Resources/flutter_html · GitHub
[go: up one dir, main page]

Skip to content
BRs are not handled correctly in shrinkWrap mode #731
Closed
@tneotia

Description

@tneotia

Describe the bug:
<br>s are not handled correctly while in shrinkWrap: true - only if you have a block element, then <br>, then another block element. It seems as though 3 "/n"s are added in shrinkWrap mode, when there should only be one.

HTML to reproduce the issue:

<p>Curabitur sollicitudin enim et malesuada porttitor. Sed erat velit, <a href="https://www.google.com">tempor vitae tristique</a> quis, dapibus vel erat.</p>
<br>
<p>Sed ut perspiciatis unde omnis iste natus </p>

Html widget configuration:

Html(
  data: """
              <p>Curabitur sollicitudin enim et malesuada porttitor. Sed erat velit, <a href="https://www.google.com">tempor vitae tristique</a> quis, dapibus vel erat.</p>
              <br>
              <p>Sed ut perspiciatis unde omnis iste natus </p>
        """,
  style: {
    "body": Style(margin: EdgeInsets.zero, padding: EdgeInsets.zero,
        backgroundColor: Colors.purpleAccent),
    "h1": Style(backgroundColor: Colors.amber[200]),
    "h2": Style(backgroundColor: Colors.amber[500]),
    "p": Style(backgroundColor: Colors.amber[800]),
  },
  shrinkWrap: true,
),

Expected behavior:
shrinkWrap: true looks the same as shrinkWrap: false

Screenshots:

Actual Expected
image image

Device details and Flutter/Dart/flutter_html versions:
SM-G975F, Flutter & Dart beta, flutter_html master.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0