BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Move to `micromark` or other synchronous `mdast` packages, need table extension, strikethrough extension, and auto-link

Open compulim opened this issue 2 years ago • 0 comments

Is your feature request related to a problem?

markdown-it does not fully represent the Markdown tree we want to parse/walk. Also, it's starting showing its age.

Describe the suggestion or request in detail

We want to parse the reference list. However, markdown-it doesn't simply collapse the reference list (#4841) in its tree. However, micromark (backed by mdast) does a better job representing the Markdown.

micromark is part of mdast, which also power remark.

We should consider moving to micromark for maintainability and futureproof.

Describe alternatives you have considered

We cannot use remark because it is async. However, micromark and the mdast-* family of packages looks great.

marked looks pretty outdated.

Currently, out of 4 engines (markdown-it, micromark, remark, marked), all of them return string rather than React or DOM element.

We should also consider moving from sanitize-html to dompurify. Also need to study HTML Sanitizer API in modern browsers.

We should also consider building a new packages for keeping micromark plugins so web devs can reuse them to rebuild their own Markdown engine configurations.

image

Additional context

No response

compulim avatar Sep 01 '23 22:09 compulim