Javascript Implementation for converting HTML to Markdown text