diff --git a/CHANGELOG.md b/CHANGELOG.md index 2588fea..0e9440f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Adopted the `package:dart_flutter_team_lints` linting rules. - Fixed an issue with `querySelector` where it would fail in some cases with descendant or sibling combinators (#157). +- Add an API example in `example/`. ## 0.15.1 diff --git a/README.md b/README.md index f5388b2..05a19a8 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ A Dart implementation of an HTML5 parser. Parsing HTML is easy! ```dart -import 'package:html/parser.dart' show parse; +import 'package:html/parser.dart'; -main() { +void main() { var document = parse( '
Hello world! HTML5 rocks!'); print(document.outerHtml); diff --git a/example/main.dart b/example/main.dart new file mode 100644 index 0000000..309ed7c --- /dev/null +++ b/example/main.dart @@ -0,0 +1,57 @@ +import 'package:html/dom.dart'; +import 'package:html/dom_parsing.dart'; +import 'package:html/parser.dart'; + +void main(ListText.
+