-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in odd places appears as text #33
Comments
Actually it appears that whenever there is text at the end of some html element it is used as the succeed statement. For example, this line caused the same error. <a href="http://example.com/">Look here</a> come on. And below is the corresponding haml. = succeed "come on." do
%a{href: "http://example.com/"} Look here However one would expect %a{href: "http://example.com/"} Check me out
come on. |
@omarshammas I am not able to reproduce this. $> echo '<a href="http://example.com/">Look here</a> come on.' | html2haml -e
%a{:href => "http://example.com/"} Look here
come on. Which version of the library are you using? |
Maybe it's connected with Nokogiri::XML parser. When html2haml prefers XML parser to Nokogiri::HTML then strange errors may appear. |
Very likely. Generally, the rule is if Nokogiri's HTML parser produces some error codes, it will try to use the XML parser which is more forgiving. This works well on things like partials and other HTML fragments, and not entire HTML documents. I'm not entirely sure how to proceed with this issue, but I will leave it open. |
Hey guys, sorry it was such a long time ago I don't even remember how I came across this error. |
Again I'm dealing with some pretty bad code, and really pushing the limits of the library.
The following
gets converted to
I would have assumed it would result in
%br
The current setup cause nbsp to appear as text in the html.
The text was updated successfully, but these errors were encountered: