Closed marnen closed 14 years ago
+1 Patching Nokogiri::XML.parse call into Nokogiri::HTML.parse in the render method of Effigy seem to have solved the problem in my app. Don't know whether it is correct way to do that.
tundraghost: I did the same thing in my app, which was using Sinatra. Patch here:
http://github.com/dancroak/effigy/commit/6a5500fdd508d591fa7a92b6ba1e9382dc68366d
Maybe the opinion of Effigy should be HTML & CSS only for now
Parse as HTML and allow fragments; closed by 978fd82e42212ead3b5691a71381135de4419229 and gh-11
At least in Rails, Effigy expects all the HTML to be contained in one parent element. This is fine for non-Rails work where the whole document is contained in an <html> element, but in Rails, the file may be wrapped in a layout, so there's no expectation that it will contain one root element. I can work around this by making sure each Effigy template is wrapped in a <div>, but that's a little silly.