IonicaBizau/medium-editor-markdown

Upgrading from 2.6.0 to 3.0.0 breaks underline

Closed this issue · 4 comments

We install the extension with

      {
      extensions: {
        markdown: new MeMarkdown(md => {
               console.log( `onMeMarkdownUpdate: ${md}` );
               this.onMeMarkdownUpdate( md );
          });
      },

With these versions, underline works:

    "medium-editor": "5.23.3",
    "medium-editor-markdown": "2.6.0",

With these versions, underline does not:

    "medium-editor": "5.23.3",
    "medium-editor-markdown": "3.0.0",

With v3.0.0, When I hit the Underline formatting button in MediumEditor on some text, say hi, then we get:

console.log( `onMeMarkdownUpdate: ${md}` );
onMeMarkdownUpdate: hi

With v2.6.0, When I hit the Underline formatting button in MediumEditor on hi, then we get:

console.log( `onMeMarkdownUpdate: ${md}` );
onMeMarkdownUpdate: <u>hi</u>

v3.0.0, missing the <u></u> tags, is breaking underline formatting for us. Searching issue tracker for underline or under not revealing any chatter about this.

also <strike> and <del> are not converted to Markdown and <img> tags are not re-rendered (working only once)

@subatomicglue I think the issue is not related to this project but to this one: turndown.js which is used to do the conversion to Markdown. I've tested many basic tags like, u, i, del, strike, none of them got converted to Markdown

It seems like the tags I named requires new rules to be created on Turndown.js:

https://github.com/domchristie/turndown#addrulekey-rule

It's fixed in this PR: #59