Skip to content

[Discussion] Do we use a .NET Markdown Parser Library instead of our own? #3200

@michael-hawker

Description

@michael-hawker

Describe the problem this feature would solve

We have a lot of overhead for the MarkdownTextBlock supporting Markdown via our own Markdown parser. It may make more sense to refactor on top of a .NET Standard library that's maintained by a larger community, like Markdig.

This however, would require updating our MarkdownRenderer code to do all the construction from the AST.

Describe the solution

Take a dependency on a markdown parser instead of maintaining our own.

Additional context

We were thinking as part of #3062 to separate out the MarkdownTextBlock anyway, as it has a lot of dependencies, so this could also contribute to that effort as well to remove the need for the dependency on Microsoft.Toolkit.Parsers.

If we do this swap, we should convert all of our existing Unit Tests on the Parser to instead test the Renderer and check the translation between the Markdown text scenario and the UI Element tree construction.

This may also just mean we can get rid of the Microsoft.Toolkit.Parsers package entirely if we find another open source C# based RSS parser as we don't use that elsewhere in the toolkit currently.

Requirements

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions