Skip to content

Commit 574c4d3

Browse files
committed
Version 0.7.1
1 parent bd19c57 commit 574c4d3

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
## [0.7.1] - September 11, 2018:
2+
3+
* Fixes issue with text nodes that contain only a space. ([#24](https://github.com/Sub6Resources/flutter_html/issues/24))
4+
* Fixes typo in README.md from 0.7.0.
5+
16
## [0.7.0] - September 10, 2018:
27

3-
* Adds full support for `ul`
8+
* Adds full support for `ul` and `ol`
49

510
## [0.6.2] - September 5, 2018:
611

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ A Flutter widget for rendering static html tags as Flutter widgets. (Will render
88
Add the following to your `pubspec.yaml` file:
99

1010
dependencies:
11-
flutter_html: ^0.7.0
11+
flutter_html: ^0.7.1
1212

1313
## Currently Supported HTML Tags:
14-
`a`, `abbr`, `acronym`, `address`, `article`, `aside`, `b`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `caption`, `cite`, `code`, `data`, `dd`, `del`, `dfn`, `div`, `dl`, `dt`, `em`, `figcaption`, `figure`, `footer`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `header`, `hr`, `i`, `img`, `ins`, `kbd`, `li`, `main`, `mark`, `nav`, `noscript`, `p`, `pre`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `section`, `small`, `span`, `strike`, `strong`, `table`, `tbody`, `td`, `template`, `tfoot`, `th`, `thead`, `time`, `tr`, `tt`, `u`, `ul`, `var`
14+
`a`, `abbr`, `acronym`, `address`, `article`, `aside`, `b`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `caption`, `cite`, `code`, `data`, `dd`, `del`, `dfn`, `div`, `dl`, `dt`, `em`, `figcaption`, `figure`, `footer`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `header`, `hr`, `i`, `img`, `ins`, `kbd`, `li`, `main`, `mark`, `nav`, `noscript`, `ol`, `p`, `pre`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `section`, `small`, `span`, `strike`, `strong`, `table`, `tbody`, `td`, `template`, `tfoot`, `th`, `thead`, `time`, `tr`, `tt`, `u`, `ul`, `var`
1515

1616
### Partially supported elements:
1717
> These are common elements that aren't yet fully supported, but won't be ignored and will still render somewhat correctly.
1818
19-
`center`, `ol`
19+
`center`
2020

2121
### List of _planned_ supported elements:
2222
> These are elements that are planned, but present a specific challenge that makes them somewhat difficult to implement.

lib/html_parser.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,11 @@ class HtmlParser {
728728
}
729729
} else if (node is dom.Text) {
730730
//We don't need to worry about rendering extra whitespace
731-
if (node.text.trim() == "") {
732-
return Container();
731+
if (node.text.trim() == "" && node.text.indexOf(" ") == -1) {
732+
return Wrap();
733+
}
734+
if (node.text.trim() == "" && node.text.indexOf(" ") != -1) {
735+
node.text = " ";
733736
}
734737

735738
print("Plain Text Node: '${trimStringHtml(node.text)}'");
@@ -742,7 +745,7 @@ class HtmlParser {
742745
return Text(finalText);
743746
}
744747
}
745-
return Container();
748+
return Wrap();
746749
}
747750

748751
List<Widget> _parseNodeList(List<dom.Node> nodeList) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_html
22
description: A Flutter widget for rendering static html tags as Flutter widgets. (Will render over 70 different html tags!)
3-
version: 0.7.0
3+
version: 0.7.1
44
author: Matthew Whitaker <sub6resources@gmail.com>
55
homepage: https://github.com/Sub6Resources/flutter_html
66

0 commit comments

Comments
 (0)