Migrate to null safety (#139)

- Append `-nullsafety.0` to version.
- Set min SDK to `2.12.0-0`.
- Use late field initialization over constructor assignment to clean up
  the handling of backreferences in the different "phases".
- Remove some conditional branches that are impossible to hit.
- Make the non-nullable override of Text nodes explicit with `covariant`.
tree: f8ad4807042bc024677c47dcc992fed7157b187d
  1. .github/
  2. lib/
  3. test/
  4. .gitignore
  5. analysis_options.yaml
  6. CHANGELOG.md
  7. LICENSE
  8. pubspec.yaml
  9. README.md
README.md

This is a pure Dart HTML5 parser. It's a port of html5lib from Python.

Usage

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.