Skip to content

Commit 3bb61b2

Browse files
committed
Version 0.9.9
1 parent 5dd1aea commit 3bb61b2

File tree

5 files changed

+17
-35
lines changed

5 files changed

+17
-35
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.9.9] - May 17, 2019:
2+
3+
* Fixes extra padding issue ([#87](https://github.com/Sub6Resources/flutter_html/issues/87))
4+
15
## [0.9.8] - May 14, 2019:
26

37
* Add support for `address` tag in `RichText` parser.
@@ -7,7 +11,7 @@
711
* Added onImageError callback
812
* Added custom textstyle and edgeinsets callback ([#72](https://github.com/Sub6Resources/flutter_html/pull/72))
913
* Update dependency versions ([#84](https://github.com/Sub6Resources/flutter_html/issues/84))
10-
* Fixes #82 and #86
14+
* Fixes [#82](https://github.com/Sub6Resources/flutter_html/issues/82) and [#86](https://github.com/Sub6Resources/flutter_html/issues/86)
1115

1216
## [0.9.6] - March 11, 2019:
1317

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A Flutter widget for rendering static html tags as Flutter widgets. (Will render
99
Add the following to your `pubspec.yaml` file:
1010

1111
dependencies:
12-
flutter_html: ^0.9.8
12+
flutter_html: ^0.9.9
1313

1414
## Currently Supported HTML Tags:
1515
`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`, `sub`, `sup`, `table`, `tbody`, `td`, `template`, `tfoot`, `th`, `thead`, `time`, `tr`, `tt`, `u`, `ul`, `var`

lib/html_parser.dart

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -755,11 +755,13 @@ class HtmlRichTextParser extends StatelessWidget {
755755
));
756756
}
757757
BlockText blockText = BlockText(
758-
margin: _customEdgeInsets ??
759-
EdgeInsets.only(
760-
top: 8.0,
761-
bottom: 8.0,
762-
left: parseContext.indentLevel * indentSize),
758+
margin: node.localName != 'body'
759+
? _customEdgeInsets ??
760+
EdgeInsets.only(
761+
top: 8.0,
762+
bottom: 8.0,
763+
left: parseContext.indentLevel * indentSize)
764+
: EdgeInsets.zero,
763765
padding: EdgeInsets.all(2.0),
764766
decoration: decoration,
765767
child: RichText(
@@ -784,30 +786,6 @@ class HtmlRichTextParser extends StatelessWidget {
784786
}
785787
}
786788

787-
// List<dynamic> _parseNodeList({
788-
// @required List<dom.Node> nodeList,
789-
// @required List<BlockText> rootWidgetList, // the widgetList accumulator
790-
// int parentIndex, // the parent spans list accumulator
791-
// int indentLevel = 0,
792-
// int listCount = 0,
793-
// String listChar = '•',
794-
// String blockType, // blockType can be 'p', 'div', 'ul', 'ol', 'blockquote'
795-
// bool condenseWhitespace = true,
796-
// }) {
797-
// return nodeList.map((node) {
798-
// return _parseNode(
799-
// node: node,
800-
// rootWidgetList: rootWidgetList,
801-
// parentIndex: parentIndex,
802-
// indentLevel: indentLevel,
803-
// listCount: listCount,
804-
// listChar: listChar,
805-
// blockType: blockType,
806-
// condenseWhitespace: condenseWhitespace,
807-
// );
808-
// }).toList();
809-
// }
810-
811789
Paint _getPaint(Color color) {
812790
Paint paint = new Paint();
813791
paint.color = color;

pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ packages:
1414
name: async
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.2.0"
17+
version: "2.1.0"
1818
boolean_selector:
1919
dependency: transitive
2020
description:
@@ -101,7 +101,7 @@ packages:
101101
name: quiver
102102
url: "https://pub.dartlang.org"
103103
source: hosted
104-
version: "2.0.3"
104+
version: "2.0.2"
105105
sky_engine:
106106
dependency: transitive
107107
description: flutter
@@ -148,7 +148,7 @@ packages:
148148
name: test_api
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "0.2.5"
151+
version: "0.2.4"
152152
typed_data:
153153
dependency: transitive
154154
description:

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.9.8
3+
version: 0.9.9
44
author: Matthew Whitaker <sub6resources@gmail.com>
55
homepage: https://github.com/Sub6Resources/flutter_html
66

0 commit comments

Comments
 (0)