Skip to content

Instantly share code, notes, and snippets.

@Echos
Created January 13, 2014 16:37
Show Gist options
  • Save Echos/8403379 to your computer and use it in GitHub Desktop.
Save Echos/8403379 to your computer and use it in GitHub Desktop.
$ rbenv global 1.9.3-p484;rbenv rehash ; ruby -v ; haml -v ; haml test.haml test1.9.html ; more test1.9.html ; od test1.9.html
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin13.0.0]
Haml 3.1.8 (Separated Sally)
Loaded. /usr/local/bin/zsh [2sec]
<html>
<head></head>
<body>
<div class='class1'>
a
b
c
d
</div>
<div class='class2'>
abcd
</div>
</body>
</html>
0000000 064074 066564 037154 020012 036040 062550 062141 036076
0000020 064057 060545 037144 020012 036040 067542 074544 005076
0000040 020040 020040 062074 073151 061440 060554 071563 023475
0000060 066143 071541 030563 037047 020012 020040 020040 060440
0000100 020012 020040 020040 061040 020012 020040 020040 061440
0000120 020012 020040 020040 062040 020012 020040 036040 062057
0000140 073151 005076 020040 020040 062074 073151 061440 060554
0000160 071563 023475 066143 071541 031163 037047 020012 020040
0000200 020040 060440 061015 061415 062015 020012 020040 036040
0000220 062057 073151 005076 020040 027474 067542 074544 005076
0000240 027474 072150 066155 005076
0000250
$ rbenv global 2.1.0;rbenv rehash ; ruby -v ; haml -v ; haml test.haml test2.1.html ; more test2.1.html ; od test2.1.html
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
Haml 4.0.5
Loaded. /usr/local/bin/zsh [1sec]
<html>
<head></head>
<body>
<div class='class1'>
a
b
c
d
</div>
<div class='class2'>
abcd
</div>
</body>
</html>
0000000 064074 066564 037154 020012 036040 062550 062141 036076
0000020 064057 060545 037144 020012 036040 067542 074544 005076
0000040 020040 020040 062074 073151 061440 060554 071563 023475
0000060 066143 071541 030563 037047 020012 020040 020040 060440
0000100 020012 020040 020040 061040 020012 020040 020040 061440
0000120 020012 020040 020040 062040 020012 020040 036040 062057
0000140 073151 005076 020040 020040 062074 073151 061440 060554
0000160 071563 023475 066143 071541 031163 037047 020012 020040
0000200 020040 060440 061015 061415 062015 020012 020040 036040
0000220 062057 073151 005076 020040 027474 067542 074544 005076
0000240 027474 072150 066155 005076
0000250
%html
%head
%body
.class1
- "a\r\nb\r\nc\r\nd\r\n".gsub(/[\r\n]+/, "\n").each_line do |line|
= line
.class2
- "a\r\nb\r\nc\r\nd\r\n".gsub(/[\r\n]+/, "\r").each_line do |line|
= line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment