[Dlang-internal] Potential changes to DDoc
John Gabriele
jgabriele at fastmail.fm
Mon Jan 22 18:35:09 UTC 2018
On Monday, 22 January 2018 at 18:17:37 UTC, David Gileadi wrote:
> On 1/22/18 10:37 AM, John Gabriele wrote:
>> On Monday, 22 January 2018 at 05:03:41 UTC, Walter Bright
>> wrote:
>>> On 1/20/2018 10:33 AM, David Gileadi wrote:
>>> {snip}
>>>
>>>> Appendix A: Planned Markdown support
>>>> ------------------------------------
>>>>
>>>> I plan to support the following Markdown features, as
>>>> specified by CommonMark [4]:
>>>>
>>>> {snip}
>>>
>>>> - Nesting lists
>>>
>>> 1. cat
>>> 2. dog
>>> 3. box
>>>
>>> is fine for ordered lists, using * for unordered ones is
>>> plenty good enough.
>>
>> For maximum ease of reading, nesting, and for consistency, I
>> suggest following the 4-space rule. That is, list item
>> *content* (not the markers) always starts at multiples of 4
>> columns in; additional paragraphs of a list item are also
>> indented 4 spaces; code blocks indented 4 spaces. For example:
>> <https://gist.github.com/uvtc/379bca988270ba8b44a30efabbfa9d6b>.
>
> Thanks for the suggestion. However, since I'm trying to stick
> to the CommonMark spec I've implemented their rules for
> determining when indented text continues a list item, etc.
AFAICT, CommonMark does indeed follow the 4-space rule, though
may also provide the extra flexibility of leaving out some
prefixing spaces. Try copying and pasting my gist example (above)
into [the CommonMark dingus](http://spec.commonmark.org/dingus/).
It works as expected.
Note also, for multiple lines in a list item, the continued lines
line up vertically with the first (same indentation throughout).
It's really a nifty consistency across all list types that makes
nesting clear cut.
More information about the Dlang-internal
mailing list