commit | ee5f00d05673c68c11844b5a83b0c1db1f2697c0 | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Mon Oct 12 16:43:53 2020 -0700 |
committer | GitHub <noreply@github.com> | Mon Oct 12 16:43:53 2020 -0700 |
tree | d83a9e32e6dae2bac4bf1af860457ccb34cb8337 | |
parent | 394927195517255a9dd24c6d331ee177073df6f4 [diff] |
Remove Marker as a name for null (#136) The checks against `== Marker` won't upgrade a nullable variable to non-nullable like `== null` would. - Replace `Marker` with `null`. Remove the field. - Add a doc comment on the class to link to the parsing spec and describe the usage of `null`. - Add a doc comment on `add` to describe it's difference from the normal `List.add`. - Add some comments and a link to an issue filed about a likely bug in this method.
This is a pure Dart HTML5 parser. It's a port of html5lib from Python.
Parsing HTML is easy!
import 'package:html/parser.dart' show parse; import 'package:html/dom.dart'; main() { var document = parse( '<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!'); print(document.outerHtml); }
You can pass a String or list of bytes to parse
. There's also parseFragment
for parsing a document fragment, and HtmlParser
if you want more low level control.