Skip to content

Commit

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

* Adds full support for `ul`

## [0.6.2] - September 5, 2018:

* Adds check for `img src` before trying to load it.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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.6.2
flutter_html: ^0.7.0

## Currently Supported HTML Tags:
`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`, `var`
`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`

### Partially supported elements:
> These are common elements that aren't yet fully supported, but won't be ignored and will still render somewhat correctly.
`center`, `ol` , `ul`
`center`, `ol`

### List of _planned_ supported elements:
> These are elements that are planned, but present a specific challenge that makes them somewhat difficult to implement.
Expand Down
7 changes: 4 additions & 3 deletions lib/html_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,15 @@ class HtmlParser {
);
case "li":
String type = node.parent.localName; // Parent type; usually ol or ul
EdgeInsets markPadding = EdgeInsets.symmetric(horizontal: 4.0);
const EdgeInsets markPadding = EdgeInsets.symmetric(horizontal: 4.0);
Widget mark;
switch (type) {
case "ul":
mark = Container(child: Text('•'), padding: markPadding);
break;
case "ol": //TODO Use index as mark
mark = Container(child: Text('•'), padding: markPadding);
case "ol":
int index = node.parent.children.indexOf(node) + 1;
mark = Container(child: Text("$index."), padding: markPadding);
break;
default: //Fallback to middle dot
mark = Container(width: 0.0, height: 0.0);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,4 @@ packages:
version: "2.1.15"
sdks:
dart: ">=2.0.0-dev.68.0 <3.0.0"
flutter: ">=0.5.0 <0.8.0"
flutter: ">=0.5.0"
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 70 different html tags!)
version: 0.6.2
version: 0.7.0
author: Matthew Whitaker <[email protected]>
homepage: https://github.com/Sub6Resources/flutter_html

Expand Down

0 comments on commit bd19c57

Please sign in to comment.