Skip to content

Commit

Permalink
Version 0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sub6Resources committed Sep 4, 2018
1 parent bb09755 commit 6f684ac
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.5.5] - September 4, 2018:

* Adds support for `acronym`, and `big`.

## [0.5.4] - August 31, 2018:

* Adds `onLinkTap` callback.
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ A Flutter widget for rendering static html tags as Flutter widgets. (Will render
Add the following to your `pubspec.yaml` file:

dependencies:
flutter_html: ^0.5.4
flutter_html: ^0.5.5

## Currently Supported HTML Tags:

* `a`
* `abbr`
* `acronym`
* `address`
* `article`
* `aside`
* `b`
* `bdi`
* `bdo`
* `big`
* `blockquote`
* `body`
* `br`
Expand Down Expand Up @@ -65,7 +67,7 @@ Add the following to your `pubspec.yaml` file:
* `section`
* `small`
* `span`
* `strike` (legacy html tag)
* `strike`
* `strong`
* `table`
* `tbody`
Expand All @@ -76,7 +78,7 @@ Add the following to your `pubspec.yaml` file:
* `thead`
* `time`
* `tr`
* `tt` (legacy html tag)
* `tt`
* `u`
* `var`

Expand Down
2 changes: 1 addition & 1 deletion lib/flutter_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Html extends StatelessWidget {
this.padding,
this.backgroundColor,
this.defaultTextStyle = const TextStyle(color: Colors.black),
this.onLinkTap
this.onLinkTap,
}) : super(key: key);

final String data;
Expand Down
21 changes: 21 additions & 0 deletions lib/html_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ class HtmlParser {
static const _supportedElements = [
"a",
"abbr",
"acronym",
"address",
"article",
"aside",
"b",
"bdi",
"bdo",
"big",
"blockquote",
"body",
"br",
Expand Down Expand Up @@ -126,6 +128,16 @@ class HtmlParser {
decorationStyle: TextDecorationStyle.dotted,
),
);
case "acronym":
return DefaultTextStyle.merge(
child: Wrap(
children: _parseNodeList(node.nodes),
),
style: const TextStyle(
decoration: TextDecoration.underline,
decorationStyle: TextDecorationStyle.dotted,
),
);
case "address":
return DefaultTextStyle.merge(
child: Wrap(
Expand Down Expand Up @@ -177,6 +189,15 @@ class HtmlParser {
return Wrap(
children: _parseNodeList(node.nodes),
);
case "big":
return DefaultTextStyle.merge(
child: Wrap(
children: _parseNodeList(node.nodes),
),
style: const TextStyle(
fontSize: 20.0,
),
);
case "blockquote":
return Padding(
padding: EdgeInsets.fromLTRB(40.0, 14.0, 40.0, 14.0),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_html
description: A Flutter widget for rendering static html tags as Flutter widgets. (Will render over 60 different html tags!)
version: 0.5.4
version: 0.5.5
author: Matthew Whitaker <sub6resources@gmail.com>
homepage: https://github.com/Sub6Resources/flutter_html

Expand Down

0 comments on commit 6f684ac

Please sign in to comment.