diff vendor/masterminds/html5/README.md @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/masterminds/html5/README.md	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/masterminds/html5/README.md	Thu Feb 28 13:11:55 2019 +0000
@@ -2,7 +2,7 @@
 
 HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP.
 It is stable and used in many production websites, and has
-well over [one million downloads](https://packagist.org/packages/masterminds/html5).
+well over [five million downloads](https://packagist.org/packages/masterminds/html5).
 
 HTML5 provides the following features.
 
@@ -24,21 +24,21 @@
 
 Install HTML5-PHP using [composer](http://getcomposer.org/).
 
-To install, add `masterminds/html5` to your `composer.json` file:
+By adding the `masterminds/html5` dependency to your `composer.json` file:
 
 ```json
 {
   "require" : {
-    "masterminds/html5": "2.*"
+    "masterminds/html5": "^2.0"
   },
 }
 ```
 
-(You may substitute `2.*` for a more specific release tag, of
-course.)
+By invoking require command via composer executable:
 
-From there, use the `composer install` or `composer update` commands to
-install.
+```bash
+composer require masterminds/html5
+```
 
 ## Basic Usage
 
@@ -50,9 +50,9 @@
 <?php
 // Assuming you installed from Composer:
 require "vendor/autoload.php";
+
 use Masterminds\HTML5;
 
-
 // An example HTML document:
 $html = <<< 'HERE'
   <html>
@@ -75,8 +75,6 @@
 
 // Or save it to a file:
 $html5->save($dom, 'out.html');
-
-?>
 ```
 
 The `$dom` created by the parser is a full `DOMDocument` object. And the
@@ -117,8 +115,6 @@
 This library provides the following low-level APIs that you can use to
 create more customized HTML5 tools:
 
-- An `InputStream` abstraction that can work with different kinds of
-input source (not just files and strings).
 - A SAX-like event-based parser that you can hook into for special kinds
 of parsing.
 - A flexible error-reporting mechanism that can be tuned to document
@@ -132,7 +128,6 @@
 
 The parser is designed as follows:
 
-- The `InputStream` portion handles direct I/O.
 - The `Scanner` handles scanning on behalf of the parser.
 - The `Tokenizer` requests data off of the scanner, parses it, clasifies
 it, and sends it to an `EventHandler`. It is a *recursive descent parser.*
@@ -202,7 +197,7 @@
 - PLAINTEXT: Unsupported.
 - Adoption Agency Algorithm: Not yet implemented. (8.2.5.4.7)
 
-##XML Namespaces
+## XML Namespaces
 
 To use XML style namespaces you have to configure well the main `HTML5` instance.
 
@@ -219,7 +214,7 @@
 ```
 
 You can also add some default prefixes that will not require the namespace declaration,
-but it's elements will be namespaced.
+but its elements will be namespaced.
 
 ```php
 use Masterminds\HTML5;
@@ -243,7 +238,7 @@
 
 We owe a huge debt of gratitude to the original authors of html5lib.
 
-While not much of the orignal parser remains, we learned a lot from
+While not much of the original parser remains, we learned a lot from
 reading the html5lib library. And some pieces remain here. In
 particular, much of the UTF-8 and Unicode handling is derived from the
 html5lib project.