Hi all. I just wanted to mention that I found an easy way to get
Markdown support in Erlyweb - use ports.
I'm not at my development machine right now, so I don't have the code
available to post, but I think anyone here could easily follow these
directions to get their own version running:
1. Grab a copy of the Python Markdown implementation
2. Download the source for the port-writing tutorial on trapexit
3. Change the echo.py script to accept multiple lines, terminated by a
"separator line". Once you have the lines you need, call
markdown.markdown(Lines). Return the result the same way the echo
script would return its result.
4. You're basically done at this point (just clean up the rough edges
I've left you with). I also changed the "OK" that echo.py uses to
signal the end of the reply to something less likely to show up in a
normal block of text.
Now when you call echo:echo("String"), you'll get back XHTML based on
the Markdown you gave it.
I can post my code later tonight, if people want it. I'm no Python
guru, so it would be interesting to see how many gasps of horror my
code would generate. ;)
If you'd like proof that this is possible, and I'm not just making it
up, please check out the website I've put together at <http://
beerriot.com/>. Comment fields accept Markdown syntax. And, yes, the
whole site is built on Erlyweb (v0.5 - I haven't had time to try out
0.6 yet). :)
*fingers crossed that my virtual server can handle public knowledge*