Skip to content

Instantly share code, notes, and snippets.

@kevsmith
Created December 12, 2008 23:36
Show Gist options
  • Save kevsmith/35339 to your computer and use it in GitHub Desktop.
Save kevsmith/35339 to your computer and use it in GitHub Desktop.
#main
%span#message
%table
%tr
%td
Hello, world
%td
This is a test.
10> T = herml_parser:file("tests/examples/hello_world.herml").
[{{tag_decl,[{tag_name,"div"},{id,"main"}]},
[{{tag_decl,[{tag_name,"span"},{id,"message"}]},
[{{tag_decl,[{tag_name,"table"}]},
[{{tag_decl,[{tag_name,"tr"}]},
[{{tag_decl,[{tag_name,"td"}]},
[{" Hello, world",[]}]},
{{tag_decl,[{tag_name,"td"}]},
[{" This is a test.",[]}]}]}]}]}]}]
11> io:format("~s", [herml_htmlizer:render(T)]).
<div id="main>
<span id="message>
<table>
<tr>
<td>
Hello, world
</td>
<td>
This is a test.
</td>
</tr>
</table>
</span>
</div>
ok
12>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment