Updated client-side Markdown parser