Remove leading dot from DDOC_ANCHOR#1185
Closed
JakobOvrum wants to merge 1 commit intodlang:masterfrom
Closed
Conversation
Contributor
|
Looks good to me. If there's no objections by the end of the day, someone ping me and I'll hit the merge myself. |
Member
|
Does this fix anything in practice? Because obviously it does break legacy links, and breaking links is bad practice. |
Contributor
|
How about generating both dot-prefixed and non-prefixed anchors via This should get us rid of the duplicates and keep all links working. |
Contributor
|
I suspect those legacy links were already really broken. I never used them because they wouldn't link to the right place anyway! |
Contributor
|
PR closed as stalled. If you wish to resurrect it you are welcome to do so. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The leading dot was introduced in #179 to avoid conflicts with legacy fragment names.
However, the legacy fragment name scheme is not compatible with HTML. Fragment names must be unique in the document, whether using
name(removed in HTML5) orid, otherwise behaviour is undefined. For example, for http://dlang.org/phobos/std_stdio#writeln, Firefox links to thename="writeln"appearing earliest in the document, which is actuallystd.stdio.File.writeln, as opposed to thestd.stdio.writelnone would expect.With this PR, only the qualified name (rooted in the module) emits a fragment, so we can remove the leading dot.
Apropos
name, it should be changed toideverywhere for HTML5 compatbility. This PR only does it in one place.