Improving ddoc

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 2 06:07:29 PST 2015


On Wednesday, 31 December 2014 at 19:50:49 UTC, Andrei 
Alexandrescu wrote:
> Hello,
>
>
> In wake of the recent discussions on improving ddoc syntax 
> we're looking at doing something about it. Please discuss any 
> ideas you might have here. Thanks!

Quite often pull requests for the changelog [0] contain 
unbalanced parens.
Maybe we can replace some of the parens with indent level nesting?

Example:

$(BUGSTITLE Language Changes,
$(LI $(RELATIVE_LINK2 asm-attributes, Asm statements can now be 
used in pure nothrow @nogc @trusted code.))
)

$BUGSTITLE Language Changes
   $LI $RELATIVE_LINK2 asm-attributes, Asm statements can now be 
used in pure nothrow @nogc @trusted code.

An indented block is the last argument to a macro (BUGSTITLE).
A macro without parens has all of it's arguments on the same line.
Commas belong to the innermost macro (RELATIVE_LINK2).
Parens can still be used.

[0]: 
https://github.com/D-Programming-Language/dlang.org/blob/master/changelog.dd


More information about the Digitalmars-d mailing list