Skip to content

Commit 5c056e8

Browse files
committed
update readme with new html5 parser info
1 parent 64aab44 commit 5c056e8

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ Instead of having a hard-coded list of all the different microformats, it follow
1010

1111
There are two ways of installing php-mf2. I **highly recommend** installing php-mf2 using [Composer](http://getcomposer.org). The rest of the documentation assumes that you have done so.
1212

13-
To install using Composer, run `./composer.phar require mf2/mf2:~0.3`
13+
To install using Composer, run
14+
15+
```
16+
composer require mf2/mf2
17+
```
1418

1519
If you can’t or don’t want to use Composer, then php-mf2 can be installed the old way by downloading [`/Mf2/Parser.php`](https://raw.githubusercontent.com/indieweb/php-mf2/master/Mf2/Parser.php), adding it to your project and requiring it from files you want to call its functions from, like this:
1620

@@ -23,6 +27,15 @@ require_once 'Mf2/Parser.php';
2327
$mf = Mf2\fetch('https://waterpigs.co.uk');
2428
```
2529

30+
It is recommended to install the HTML5 parser for proper handling of HTML5 elements. Using composer, run
31+
32+
```
33+
composer require masterminds/html5
34+
```
35+
36+
If this library is added to your project, the php-mf2 parser will use it automatically instead of the built-in HTML parser.
37+
38+
2639
### Signed Code Verification
2740

2841
From v0.2.9, php-mf2’s version tags are signed using GPG, allowing you to cryptographically verify that you’re using code which hasn’t been tampered with. To verify the code you will need the GPG keys for one of the people in the list of code signers:
@@ -342,6 +355,18 @@ Currently php-mf2 passes the majority of it’s own test case, and a good percen
342355

343356
### Changelog
344357

358+
#### v0.4.3
359+
360+
2018-03-29
361+
362+
If the [masterminds/html5](https://github.com/Masterminds/html5-php) HTML5 parser is available, the Mf2 parser will use that instead of the built-in HTML parser. This enables proper handling of HTML5 elements such as `<article>`.
363+
364+
To include the HTML5 parser in your project, run:
365+
366+
```
367+
composer require masterminds/html5
368+
```
369+
345370
#### v0.4.2
346371

347372
2018-03-29

0 commit comments

Comments
 (0)