Working with a designer's html document, I converted it to haml with html2haml.
I then ran haml on the
new document to get back html and then compared the original html to the new
version and found that some
of my a refs went missing. I made the sample documents below to show what
happened.
The Copyright line:
Copyright © 2010 <a href="#">Absolutin</a>. All rights reserved.
Became in haml:
Copyright © 2010
- succeed "." do
%a{:href => "#"} Absolutin
All rights reserved.
Then the succeed function failed (why was it there in the first place?) going
back to html resulting in the Copyright line being:
Copyright © 2010
All rights reserved.
and the a ref is gone.
Very Strange. Any Idea what is going on here?
Matt
$ cat aref.orig.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Absolutin</title>
</head>
<body>
<div id="copyright">
<div>
<a href="#" class="club07"></a>
<p>
Copyright © 2010 <a href="#">Absolutin</a>. All rights reserved.
</p>
<div class="clear">
</div>
</div>
</div>
</body>
</html>
$ html2haml aref.orig.html > aref.haml
$ cat aref.haml
!!!
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" =>
"Content-Type"}/
%title Absolutin
%body
#copyright
%div
%a.club07{:href => "#"}
%p
Copyright © 2010
- succeed "." do
%a{:href => "#"} Absolutin
All rights reserved.
.clear
$ haml aref.haml > aref.html
$ cat aref.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<title>Absolutin</title>
</head>
<body>
<div id='copyright'>
<div>
<a class='club07' href='#'></a>
<p>
Copyright © 2010
All rights reserved.
</p>
<div class='clear'></div>
</div>
</div>
</body>
</html>
$ haml --version
Haml/Sass 3.0.6 (Classy Cassidy)
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.