Repository navigation
Skip legacy anchors that duplicate the new id - #1886
Open
sourya2704 wants to merge 1 commit into
Open
sourya2704 wants to merge 1 commit into
sourya2704 wants to merge 1 commit into
Conversation
Class pages put a legacy-anchor span with klass.legacy_aref before the heading with klass.aref. For a class whose name is all lowercase, like fatal, both are class-fatal, so the page has a duplicate id. The same happens for sections whose title is a single lowercase word. Only emit the legacy anchor when it differs from the new id, in both the darkfish and aliki templates. Fixes ruby#1883
This branch has not been deployed
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.
Fixes #1883.
Class pages put a legacy anchor with
klass.legacy_arefbefore the heading withklass.aref. For a class whose name is all lowercase, both are the same, sofatal.htmlhasid="class-fatal"twice:Sections have the same problem when the title is a single lowercase word.
section.legacy_arefandsection.arefare then bothfoo. In darkfish the duplicate is the<section>id, and in aliki it's the section's<h2>id.This only emits the legacy anchor when it differs from the new id, in the darkfish and aliki class templates. The new tests generate a lowercase class with a lowercase section and check that the page has no duplicate ids.
bundle exec rake normal_testpasses.#1884 (duplicate
*-sourceids for method source code) is a different problem and isn't changed here.