Broken links continue to exist on major pages on dlang.org

Sönke Ludwig via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 3 04:59:24 PDT 2016


Am 03.06.2016 um 13:47 schrieb Sönke Ludwig:
> Am 03.06.2016 um 11:49 schrieb ag0aep6g:
>> On 06/02/2016 09:09 PM, Sönke Ludwig wrote:
>>> Which are the remaining issues that you know of?
>>
>> Next up: MYREF.
>>
>> Example page with missing links:
>> http://dlang.org/library/std/string.html
>>
>> In std.ddoc, MYREF is defined as:
>>
>>       MYREF = <a href="#.$1">$(TT $1)</a>$(NBSP)
>>
>> In std-ddox-override.ddoc it's:
>>
>>       MYREF = $1
>>
>> That's no good, of course. But I also don't see a way to define it
>> properly. It would have to be something like this:
>>
>>      MYREF = <a href="./$(MODULE)/$1.html">$(TT $1)</a>$(NBSP)
>>
>> where $(MODULE) is the current module name without packages.
>>
>> But:
>>
>> 1) Something like $(MODULE) doesn't seem to exist. (Loosely related:
>> DDOX doesn't emit $(TITLE) properly.)
>>
>> 2) camelCase strikes again. $1 would have to be transformed from fooBar
>> to foo_bar to match DDOX's naming scheme. No can do with macros alone. I
>> think those underscore names may have been a mistakee.
>
> Since only 12 modules are affected, probably the easiest way is to use
> the same approach as std.algorithm and define MYREF in each module
> separately as:
>
>      MYREF = $(REF_ALTTEXT $(TT $1), $1, std, xxx)$(NBSP)
>
> And then remove the definition from std.ddoc

Wait a minute... MYREF = $(D $1) in std-ddox-override.ddoc should 
actually do the job just fine. Those links should have actually worked 
before until I removed full-text automatic cross-references from DDOX.


More information about the Digitalmars-d mailing list