Another use case for __traits(docComment)
Adam D. Ruppe
destructionator at gmail.com
Wed Nov 13 18:46:43 UTC 2019
On Wednesday, 13 November 2019 at 18:02:35 UTC, Dennis wrote:
> 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.
That's because HTML ignores extra spaces. If you were to do
__traits(docComment) and output it to an HTML file, you'd see
that same result. The space is still there, it is just rendered
differently by the target environment.
All __traits(docComment) should do is return the source code
after the compiler read it. (actually, I wouldn't even mind if it
was the whole comment, in full, including the delimiters, but if
the compiler already removes stars I'm ok with that too)
> 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!")
Well, adrdox is not compatible with ddoc exactly, so I'd just
accept that.
More information about the Digitalmars-d
mailing list