-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Allow for fragmented list from a directive #357
Comments
I should add, the current workaround is: <!-- prettier-ignore -->
* one
* two
* three |
Thank you for reminding me. As you said, a configurable fragmented list was there on the far of the roadmap.
One of the ideas I had been thought at that time is to specify a marker symbol via the global/local directive. The Markdown author can control a marker for the fragmented list as like that: <!-- fragmentMarker: "-" -->
- Step 1
- Step 2
- Step 3
---
<!-- fragmentMarker: ["-", "*"] -->
- Step 1
- Step 1-1
- Step 1-2
* Step 2
* Step 2-1
* Step 2-2 This idea is using Marp's existing directive syntax. And the member of Prettier @kachkaev provides another interesting idea:
- <!-- fragmented --> Step 1
- <!-- fragmented --> Step 2
- <!-- fragmented --> Step 3 (Marpit framework does not limit how to proceed the fragmented list so I use more inclusive word Pros: Explicit and never break any existing CommonMark rules. Annotating the list item with HTML comment is similar approach to Marp Core's fitting header Cons: Looks like a bit redundant. The marker |
Correct me if I'm wrong, but couldn't you support both:
Then you won't break compatibility and Prettier is still happy. I honestly don't have a strong opinion. The tool already does a good job so I'm inclined to just go along with whatever works 😄 👍 |
I can only support @thejcannon's proposal. I just started to use fragmented lists together with prettier and landed here ;) The comment per item is more flexible so I would prefere it over the |
👋
Howdy! Trying out Marp and I'm liking it so far.
One issue I've run into is that Prettier pretty unambiguously formats unordered lists using a hyphen
-
, which means it doesn't play nicely with Marp's fragmented list.Here's some relevant issues:
Support for a directive would solve the corss-roads of Prettier and Marp, and as mentioned in the second link, would be very explicit.
Thanks!
The text was updated successfully, but these errors were encountered: