Here is the project:
https://github.com/showell/PipeDent/blob/master/pipedent.coffee
I'm calling it PipeDent for now, because I am just porting a minimal subset of
features for now.
You can see it here. Right now I just support it in node.js, but obviously it
would be nice to make it work in the browser too.
~/WORKSPACE/PipeDent > coffee -c *.coffee && cat test.coffee && echo '----' &&
node test.js
input = \
'''
html
head
body
table
tr
td id="one" | one
td id="two" | two
p
| This is just free
| form text.
div class="body"
<b>raw html just passes thru and takes precedence over | </b>
span | Hello world
'''
pipedent = require './pipedent'
console.log pipedent.convert(input)
----
<html>
head
<body>
<table>
<tr>
<td id="one">one</td>
<td id="two">two</td>
</tr>
</table>
<p>
This is just free
form text.
</p>
<div class="body">
<b>raw html just passes thru and takes precedence over | </b>
</div>
<span>Hello world</span>
</body>
</html>
I set up a mailing list here:
http://groups.google.com/group/pipedent