Skip to content

Conversation

@JakobOvrum
Copy link
Contributor

It looks like DDox detects and handles module references in the same way it detects symbol references. This fixes module references in /library-prerelease/ and removes <a>-inside-<a> shenanigans.

DDox doesn't appear to detect module references if they appear the end of a punctuated sentence, like see std.algorithm.; I'll file that over at the DDox repository.

@JakobOvrum
Copy link
Contributor Author

Filed: dlang/ddox/issues/110

@CyberShadow
Copy link
Member

DDox doesn't appear to detect module references if they appear the end of a punctuated sentence, like see std.algorithm.; I'll file that over at the DDox repository.

Maybe wrap it into a <span> (with no adornments)?

@JakobOvrum
Copy link
Contributor Author

Hm, it still doesn't recognize it with <span>.

@s-ludwig
Copy link
Member

The planned future way is to only recognize symbols within backticks, or within $(D). So in this case I'd define

MREF=`$+`

I'll have a look at the end-of-sentence issue.

@JakobOvrum
Copy link
Contributor Author

$(MREF a, b, c) now resolves to a.b.c for DDox.

edit:

Note that it shows up verbatim with current DDox.

@s-ludwig
Copy link
Member

Hm, is there an example MREF use somewhere? Everywhere I looked, I found only things like $(LINK2) or $(B) used.

@JakobOvrum
Copy link
Contributor Author

@s-ludwig, PR for Phobos links: dlang/phobos/pull/3926

No PR for druntime or dlang.org yet.

@s-ludwig
Copy link
Member

Okay, tested locally and MREF=$(D $1$(DOT_PREFIXED $+)) works. I need to check how Ddox behaves for backticks within macro definitions.

BTW, std.algorithm currently doesn't emit a link, because it's detected as a package. I'll add support for forwarding to "package.d" there.

@JakobOvrum
Copy link
Contributor Author

Thanks, changed to MREF=$(D …).

@CyberShadow
Copy link
Member

@JakobOvrum How about REF too, as per dlang/phobos#3926 (comment) ?

@JakobOvrum
Copy link
Contributor Author

Done, seems to work, but I'm getting confused as to exactly where the apidocs-* targets look for Phobos. Should be ../phobos, no?

@CyberShadow
Copy link
Member

but I'm getting confused as to exactly where the apidocs-* targets look for Phobos. Should be ../phobos, no?

Looks like it reads its tasks from a JSON file (docs.json / docs-prerelease.json), which is generated using ${PHOBOS_DIR}, which by default is defined as ../phobos, so yeah.

@adamdruppe
Copy link
Contributor

So, this thing works? The code looks fine to me, I'll pull tomorrow if there's no objections.

@s-ludwig
Copy link
Member

s-ludwig commented Mar 8, 2016

Looks good to me, too. The diff is also fine.

adamdruppe added a commit that referenced this pull request Mar 9, 2016
Let DDox handle module references
@adamdruppe adamdruppe merged commit e05947f into dlang:master Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants