Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown encoder/decoder doesn't recognize "-" as start of unordered list item #442

Open
adriank opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@adriank
Copy link

adriank commented Dec 19, 2024

Steps to Reproduce

final doc = const ParchmentMarkdownCodec().decode('''
paragraph
- a
- b
- c
''');

The unordered list is not recognized.

line 39 is:

static final _ulRegExp = RegExp(r'^( *)\* +(.*)');

and should be:

static final _ulRegExp = RegExp(r'^( *)[-\*\+] +(.*)');

There is also

    ParchmentAttribute.ul: '* ',

which should probably be customizable, since it depends heavily on locale and context (for example, in books - is commonly used, not *).

Here is markdown recommendation: https://www.markdownguide.org/basic-syntax/#unordered-lists. Unordered list items can start with -, *, and +.

@amantoux amantoux added the enhancement New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants