asciidoctor / kramdown-asciidoc

A kramdown extension for converting Markdown documents to AsciiDoc.
Other
207 stars 19 forks source link

New option to control indenting of list markers #119

Open Vampire opened 7 months ago

Vampire commented 7 months ago

There should be an option to toggle indenting of list markers. Either a boolean to switch it between off and 1 per level from level 2 on (current default), or a numeric to control how many per level with default 1 like now.

mojavelinux commented 7 months ago

If we decide on the boolean option, I propose the following name:

In this case, the list item marker is indented 1 space for each level of nesting.

If we decide on the numeric multiplier option, I propose the following name:

In this case, the each list item marker is indented by this multiplier of the level of nesting (2 is 2 spaces x level of nesting).

The "nested" name segment may be too pedantic and I'd be open to dropping it. What I worry is that someone might think the top-level marker is indented too, which it won't be (and shouldn't be). I'm on the fence about this.

The default would need to match the current behavior for backwards compatibility (though we may have wished there to be no indent by default...but what's done is done).

I'm leaning towards the multiplier option for two reasons. First, I think the option is a bit easier to read. It reads as "nested list marker indent" which is reasonably self documenting. Second, I think as soon as we offer the ability to toggle it, someone will want to control how much indentation is used. So we end up right back here, only now having to come up with a second option. It just seems like one of those times when it make sense to take it all the way.