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
Add bullet list style options #229
Conversation
Would this even need to be an option? I should think that the parser ought to accept any of those types at all times:
|
@gjtorikian it does accept all those options, but it doesn't output all of them. Today it only outputs $ echo "+ foo" | comrak --to commonmark && echo "* foo" | comrak --to commonmark && echo "- foo" | comrak --to commonmark
- foo
- foo
- foo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking great! Once the docs are done (and seriously, don't spend much time on it, just straightforward one-liners are enough), this will be good to merge!
I'd love to give you some more feedback from a Rust perspective, but there's nothing to say from my point of view; looks clean!
@@ -1272,6 +1300,7 @@ fn exercise_full_api<'a>() { | |||
width: 123456, | |||
unsafe_: false, | |||
escape: false, | |||
list_style: ::ListStyleType::Dash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self for next release: this will need a correspondingly large bump because we're modifying the public API.
(🤞 I remember.)
This change adds a new option `--list-style` so users can choose which character all bulleted lists use for their marker. The [commonmark spec] supports three options for bullet markers: `-`, `*`, `+` which is also now the case here. Previously, when comrak (or cmark-gfm) rendered markdown, it would pick `-` which is now the default. This also adds the ability to optionally provide custom ComrakOptions when testing. If the defaults are fine, you can pass `None`. [commonmark spec]: https://spec.commonmark.org/0.30/#bullet-list-marker
b7880fb
to
3e493e0
Compare
Too late. I learned how to write rust docs that interlink! 😄 |
Ignore me, please! I misread the PR. 😞 |
Sorry for the delay — have been dealing with some kind of respiratory illness 🙃 This is excellent. Thank you. ❤️ |
This is now part of 0.14.0: https://github.com/kivikakk/comrak/releases/tag/0.14.0! |
Hi! I know this repository practices Optimistic Merging but I've put this in draft-form for for a few reasons:
1
without knowingOriginal change description below:
This change adds a new option
--list-style
so users can choose whichcharacter all bulleted lists use for their marker. The commonmark
spec supports three options for bullet markers:
-
,*
,+
which isalso now the case here. Previously, when comrak (or cmark-gfm) rendered
markdown, it would pick
-
which is now the default.This also adds the ability to optionally provide custom ComrakOptions
when testing. If the defaults are fine, you can pass
None
.