Skip to content

Commit

Permalink
Merge pull request #225 from ngaurav/new-parser
Browse files Browse the repository at this point in the history
Fixes #217
  • Loading branch information
Sub6Resources authored Feb 8, 2020
2 parents c68c59d + 3badf23 commit b5046d9
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 @@ -408,6 +408,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 b5046d9

Please sign in to comment.