JavaScript: Simple Markdown Parser