You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've attempted to reproduce this and it seems to come from using the -x flag which causes html2haml to parse the document as XHTML. If you don't close the meta tags in this case, it will assume the following tags are nested under the meta tag but not indented.
To fix this, when html2haml is treating a document as HTML rather than XML, we should should self-close the tags with the trailing "/" only if the tag closes itself in the source document.
Note that this is already partially fixed in the Nokogiri branch - the trailing slashes are still there but the tags aren't nested incorrectly as they are with the current Hpricot-based master branch.
(Originally reported by @DanielKehoe at haml/haml#588)
I'm using html2haml.
If I start with a self-closing meta tag:
<meta name="description" content=""/>
I get
%meta{:content => "", :name => "description"}/
with a superfluous trailing forward-slash.
If I start with no self-closing meta tag:
<meta name="description" content="">
I get improperly indented Haml:
Can we get this fixed for proper indentation when the meta tags are not self-closing?
Or is this my error?
The text was updated successfully, but these errors were encountered: