-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: keep the original content spacing after the list marker (#196)
A list item such as ` - list item` consists of margin indentation (A), a list marker (B), 1-4 spaces (C) and contents. The old code recorded the width from A to C as `ListItem.prepend` and B as `ListItem.leader`, but the Markdown renderer always skipped margin indentation and output exactly just 1 space after every list marker, such as `- list item`. After this change, the width of A is recorded as `ListItem.indentation`, so that the Markdown renderer can correctly restore both A and C. But the formatting features of other tokens skip margin indentation (A), for consistency of all formatting features, the Markdown renderer only restores C, such as `- list item`.
- Loading branch information
Showing
4 changed files
with
73 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters