Skip to content

Improve MDAST roundtrips fidelity #2860

@Soxasora

Description

@Soxasora

Our MDAST pipeline essentially translates a Markdown structure to a Lexical structure and vice versa, maintaining a 1:1 correspondence. Although the structure remains lossless in both directions, we cannot say the same for syntax when converting back to Markdown.

examples

links:
`https://stacker.news(/image.jpeg)` -> [https://stacker.news](https://stacker.news)
                                    -> ![](https://stacker.news/image.jpeg)

inline syntax:
`*` or `_` -> *

lists:
`*` or `-` -> *

These are not huge problems, actually in some cases our pipeline fixes Markdown indentation and style (can't beat the serialization of a tree), and maybe we just need to retain the user syntax choices when converting.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions