Closed steventill closed 10 years ago
As for Hpricot, it is not maintained anymore. Don't think that it is a right tool to use, since it is deprecated.
Agreed. Hpricot has been abandoned for quite a while now, so using it is not a great idea.
One thing you can do is use Nokogumbo, which uses the Gumbo parser but outputs a Nokogiri document. It has the advantage of leaving Polymer's optional attribute syntax - i.e. the ?=
in <p hidden?="{{hidden}}"></p>
- alone.
The downside is that Nokogiri/gumbo's to_html
and to_s
methods mangle selected
and src
attributes, which also mess up Polymer. In this situation I would convert most of the nodes in a document to html, but for those with selected
/src
attributes, convert to xhtml.
Closing this as it was solved in v0.2.3
Has merge of asset_path_inclusion branch, and switched from nokogiri to hpricot.
Hpricot is dead, but it still works better then nokogiri for what polymer needs (not altering templates based on html spec). It even adds shim-shadowdom attributes to the replacement nodes if the attribute exists on the original tag