Better docs for D (WIP)

Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Dec 28 15:01:05 PST 2015


On 12/28/15 3:15 PM, Adam D. Ruppe wrote:
> http://dpldocs.info/
>
> Inspired by the php docs, I also have it able to search direct from a
> URL. Click this:
>
> http://dpldocs.info/findSkip

The signature proper is nice. The formatting of "&&" in the constraint 
is inconsistent, but I guess that's a matter with the formatting of the 
code.

The vertical spacing post "Parameters" of http://dpldocs.info/findSkip 
is annoying. So we have a healthy vertical space between the 
"Parameters" and "haystack" headings - fine - then a dinghy space 
between "haystack" and the type, then again a large space between the 
"Type:" and the description.

I think types should be massaged with the parameter names. Also the type 
of the return value should be massaged with the heading "Return Value" 
and the valign of the return value's description should be the same as 
for the parameters, so we have:

========
Parameters
((vspace 1))
R1 haystack
((hspace 1))The forward range to search in.
((vspace 2))
R2 needle
((hspace 1))The forward range to search for.
((vspace 2))
Return Value (bool)
((vspace 1))
((hspace 1))true if the needle was found, in which case haystack is 
positioned after the end of the first occurrence of needle; otherwise 
false, leaving haystack untouched.
========

etc.

Ideally most of these things would be adjustable via css. Even some of 
the text (e.g. "Return Value" etc.) would be in a perfect world part of 
the css (there's that property "before" or something).

Essentially it would be fantastic if the docs contained the semantic 
info and the formatting would be entirely shipped to css.


Andrei



More information about the Digitalmars-d-announce mailing list