-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 writer: fully customizable list markers #10479
Comments
I'm reluctant to go down this path. There are ever so many choices that might be made in rendering markdown, and everyone has their own stylistic preferences. Allowing this to be configurable would add a lot of code complexity (hence also bugs and maintenance time). |
For some other examples of similar requests:
|
Either we ignore all such requests, or we provide a way to address them all. This would probably involve a config file as in #5584. But then I can imagine similar requests for other formats, e.g. RST. The complexity starts to get out of hand. |
I can understand your reluctance, |
Describe your proposed improvement and the problem it solves.
I would like to be able to fully customize the produced ordered and unordered list markers in Markdown output.
The UL bullet marker appear to have a solution via PR #1826. There seems to be no similar OL marker customization issue/PR tough.
The method of configuration seems to be in discussion at #5584.
Here, I am mostly interested by the spaces around the markers. Could pandoc provide a way to customize those? A couple of potential approaches:
bullet_before
,bullet_total
(applicable to both UL and OL, potential fallback if UL/OL specific option not provided)ul_bullet_before
,ul_bullet_total
,ol_bullet_before
,ol_bullet_total
(preferred)ul_bullet_before
,ul_bullet_total
,ol_bullet_before
,ol_bullet_total
ul_bullet_before
,ul_bullet_after
,ol_bullet_before
,ol_bullet_after
*_single_*
vs*_multi_*
variants useful? Like https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md030.md.--tab-stop
option (which currently does not appear to have any bearing on lists' style) be reused alongside with*bullet_before
?For the OL bullet marker, I assume one could pick between
1.
and#.
(extension needed).This would allow me to use
pandoc
to format / prettify the markdown files I work with. The current hardcoded choice does not match my preferred style. As I use lists a lot, this is quite annoying which prevents me from usingpandoc
as my auto formatter (or any other tool by the way as none appear to provide this feature).Desired result (
Test.md
, 1 space before markers, within a total of 4 space width):Current pandoc markdown output (close to desired, but not quite there, no space before the marker):
$ pandoc Test.md --to markdown # Test - Unordered A. Text block. - Unordered B. Text block. 1. Ordered A. Text block. 2. Ordered B. Text block.
Current commonmark markdown output (this one is oddly inconsistent in between ol an ul and doesn't appear to be influenced by
--tab-stop
):$ pandoc Test.md --to commonmark # Test - Unordered A. Text block. - Unordered B. Text block. 1. Ordered A. Text block. 2. Ordered B. Text block.
The text was updated successfully, but these errors were encountered: