Markdown Parser in JavaScript