showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript

Home Page:http://www.showdownjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Showdown fails to parse anything inside a div or span?

jeffersoneagley opened this issue · comments

Hi,

I have the following sample input somebody provided:

Input:

<div data-wrapper="true" style="font-family:'Segoe UI','Helvetica Neue',sans-serif; font-size:9pt">\n<div><span style="font-size:10pt"><u>sending this message from</u><strong> the new </strong><em>rich text editor</em></span></div>\n</div>

Actual:

<div data-wrapper=\\"true\\" style=\\"font-family:'Segoe UI','Helvetica Neue',sans-serif; font-size:9pt\\"><div><span style=\\"font-size:10pt\\"><u>sending this message from</u><strong> the new </strong><em>rich text editor</em></span></div></div>

Expected:

__sending this message from__ ** the new ** *rich text editor*

It's an output from a Dynamics CRM rich text editor, which unfortunately includes a div and span around it. These seem to break Showdown's ability to parse to Markdown. Also underlines don't work either HTML->MD.

Am I missing something?