diff --git a/README.md b/README.md index b253ebf8d..11b0249fb 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,8 @@ So, parse5 is as fast as simple specification incompatible parsers and ~15-times ##API reference ---------------------------------------- - - ###Enum: TreeAdapters -Provides built-in tree adapters what can be passed as an optional argument to the `Parser` and `TreeSerializer` constructors. - +Provides built-in tree adapters which can be passed as an optional argument to the `Parser` and `TreeSerializer` constructors. ####• TreeAdapters.default Default tree format for parse5. @@ -56,12 +52,11 @@ Default tree format for parse5. ####• TreeAdapters.htmlparser2 Quite popular [htmlparser2](https://github.com/fb55/htmlparser2) tree format (e.g. used in [cheerio](https://github.com/MatthewMueller/cheerio) and [jsdom](https://github.com/tmpvar/jsdom)). - --------------------------------------- - - + + ###Class: Parser - +Provides HTML parsing functionality. ####• Parser.ctor([treeAdapter]) Creates new reusable instance of the `Parser`. Optional `treeAdapter` argument specifies resulting tree format. If `treeAdapter` argument is not specified, `default` tree adapter will be used. @@ -78,6 +73,7 @@ var parser2 = new parse5.Parser(parse5.TreeAdapters.htmlparser2); ``` + ####• Parser.parse(html) Parses specified `html` string. Returns `document` node. @@ -98,12 +94,10 @@ var documentFragment = parser.parseFragment('