Skip to content

Commit

Permalink
Fixes #217
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaurav authored Feb 4, 2020
1 parent 753db68 commit 3badf23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/html_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ class HtmlParser extends StatelessWidget {
if (tree.style.display == Display.BLOCK) {
wpc.data = false;
}

if (tree is ImageContentElement || tree is SvgContentElement) {
wpc.data = false;
}

if (tree is TextContentElement) {
if (wpc.data && tree.text.startsWith(' ')) {
Expand Down

0 comments on commit 3badf23

Please sign in to comment.