Documenting parameters [was: Re: Worst Phobos documentation evar!]

Nick Treleaven via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 28 10:04:17 PST 2014


On 28/12/2014 14:49, Joseph Rushton Wakeling via Digitalmars-d wrote:
>
> Is there an existing equivalent that can be used for template
> parameters? "Template Params:" or "TemplateParams:", for example, don't
> work.

You can just use Params: for them also. Perhaps separating them might be 
nice though.

> BTW it would be nice if, instead of generating "hardcoded" stylistic
> information like <b></b>, <i></i> and the use of <table>, the output
> could be more generic and semantically marked up for use with CSS.  This
> is something that could contribute a lot towards making better-presented
> documentation.

ddoc allows you to override its styling macros to output anything you 
like, here are some defaults:

B =     <b>$0</b>
I =     <i>$0</i>
U =     <u>$0</u>
...
D_PSYMBOL = $(U $0)
D_PARAM   = $(I $0)
...
DDOC_PSYMBOL = $(U $0)
DDOC_KEYWORD = $(B $0)
DDOC_PARAM   = $(I $0)

http://dlang.org/ddoc.html


More information about the Digitalmars-d mailing list