DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

kraybit via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 1 07:52:03 PST 2015

On Tuesday, 1 December 2015 at 15:33:59 UTC, anonymous wrote:
> On 01.12.2015 16:15, kraybit wrote:
>>      /**
>>      *  Also see $(LINK mylib.image.pixel.html)
>>      */
>>      module mylib;
>>      ...
>> This will generate a link, but the href will be
>> "<b>mylib</b>.image.pixel.html", which won't work in my 
>> browser at least
>> (Chromium). This can be fixed with:
>>      $(LINK _mylib.image.pixel.html)
>> Ok, great. But wait a minute. How do I know that 'image' and 
>> 'pixel'
>> won't be emphasized symbols in the future?
> 'mylib' is emphasized because it's the module name and you're 
> documenting the module declaration there. That is, identifiers 
> are only emphasized automatically when they're used in the 
> declaration that is being documented. 'image' or 'pixel' would 
> only be emphasized if you changed the module name to 'image' or 
> 'pixel'.

Hm, I see, so it's contextual? Would 'pixel' then be emphasized 
if I'm in the documentation of void pixel()?

I just get the feeling I need to think before using LINK. I'd 
like to not think, too  much. It doesn't also seem clear when 
this happens. Will $(LINK forum.com/pixel/98) work? Or does it 
need a "_"?

Anyway, turning it off is good enough for me.

Thanks for the reply!

More information about the Digitalmars-d-learn mailing list