Another use case for __traits(docComment)

Dennis dkorpel at gmail.com
Wed Nov 13 18:02:35 UTC 2019


On Wednesday, 13 November 2019 at 15:40:34 UTC, Adam D. Ruppe 
wrote:
> So not identical, but this is well defined by the D language 
> spec!

Well defined, but it requires the programmer to know those 
defined rules.
I wasn't sure whether in my first example there would be a double 
space between the two 'Word's, but it turns out there is, and now 
I need to account for that when printing the text after getting 
it with __traits(docComment).

I don't have this problem when doing documentation generation, I 
just do `dub build --build=docs` and I get html pages that look 
fine (no double spaces), without needing to know what happens 
under the hood.

> Is that "* word" supposed to ignore the star? dmd ignores it 
> which is probably most consistent with the spec. My adrdox does 
> NOT ignore that and can use it for markdown-style lists...

That's probably going to give new bug reports too. ("Why did my 
list bullets disappear with __traits(docComment)? I see it just 
fine when rendering with adrdox!")


More information about the Digitalmars-d mailing list