Sha256: 1adda13d48f4b7001c40f6448edc141fca6113a5beb099ab9a0055d41f11b377

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

Nokogumbo - a Nokogiri interface to the Gumbo HTML5 parser.
===========

Nokogumbo provides the ability for a Ruby program to invoke the 
[Gumbo HTML5 parser](https://github.com/google/gumbo-parser#readme)
and to access the result as a Nokogiri parsed document.

Usage:
-----

```ruby
require 'nokogumbo'
doc = Nokogiri::HTML5(string)
```

Notes:
-----

* The `Nokogumbo.parse` function takes a string and passes it to the
<code>gumbo_parse_with_options</code> method, using the default options.
The resulting Gumbo parse tree is the walked, producing a Nokogiri parse tree.
The original Gumbo parse tree is then destroyed, and the Nokogiri parse tree
is returned. 

* Instead of uppercase element names, lowercase element names are produced.

* Instead of returning 'unknown' as the element name for unknown tags, the
original tag name is returned verbatim.

* The gem itself includes a copy of the Gumbo HTML5 parser.

Installation:
============

* Execute `rake gem`

* [sudo] gem install pkg/nokogumbo*.gem

Related efforts:
============

* [ruby-gumbo](https://github.com/galdor/ruby-gumbo#readme) - a ruby binding
for the Gumbo HTML5 parser.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nokogumbo-0.5.2 README.md
nokogumbo-0.5.1 README.md
nokogumbo-0.5 README.md