[Dlang-internal] Potential changes to DDoc

Sebastian Wilzbach seb at wilzba.ch
Tue Jan 23 01:39:03 UTC 2018


I think there were a few misunderstandings - see below:

On 2018-01-22 06:03, Walter Bright via Dlang-internal wrote:
>> - Nesting lists
> 
>    1. cat
>    2. dog
>    3. box
> 
> is fine for ordered lists, using * for unordered ones is plenty good 
> enough.

I think David was talking about _nested_ lists, e.g.

1. cat
1.1. dog
1.2. box

or

* cat
   - dog
   - box

http://spec.commonmark.org/0.28/#lists

-> Yes, would be awesome. The current way is quite verbose and forces 
you to be consistent with indentation to avoid losing the overview:

$(UL
   $(LI cat)
   $(LI
     $(UL
       $(LI dog)
       $(LI box)
     )
   )
)

If you don't indent consistently (and many people

>> - Inline links, although I'm not sure if I will support reference 
>> links [5]
> 
> Ddoc already recognizes URLs and creates links for them

Inline links are something different, e.g. [foo](https:...)
See also: http://spec.commonmark.org/0.28/#links

The equivalent in today's Ddoc is the ugly $(LINK2 link, text) macro.
-> I would love to have inline links in Ddoc!

>> - Code blocks fenced with ```, ~~~ and DDoc's existing ---
> The existing --- is good, no need to add more options.

Imho ``` is almost ubiquitously known, so according to the rule of least 
astonishment [1] three backticks should be supported
(and I doubt it's hard to do so). This will also allow to copy/paste 
better between GitHub, Ddoc and other Markdown documentations/wikis.

[1] https://en.wikipedia.org/wiki/Principle_of_least_astonishment


>> I don't plan to support the following Markdown features:
> - Tables

I know that this might be hard to do, but if you have time after your 
initial round this one would be cool to have too.
At Phobos and dlang.org there are many of these nasty tables:

https://github.com/dmd/phobos/blob/617f6b0e592a079de134317bee180f76200f4b6c/std/math.d#L6560


More information about the Dlang-internal mailing list