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.
2 files changed
tree: d83a9e32e6dae2bac4bf1af860457ccb34cb8337
  1. lib/
  2. test/
  3. .gitignore
  4. .test_config
  5. .travis.yml
  6. analysis_options.yaml
  7. CHANGELOG.md
  8. LICENSE
  9. pubspec.yaml
  10. 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.