Repository navigation
Link output scale to the Position and scale docs section - #6
Merged
Merged
Conversation
The deep-link heuristic only accepted a heading containing the key when the section mentioned it as code. "Position and scale" says "at scale 1.25", so scale fell back to the settings table. A plain mention now counts when the heading's other words are sibling keys of the same table.
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 (?) button of an output's
scaleopened the generic Settings table ofthe Umbriel outputs docs instead of the Position and scale section, while
positionalready jumped there.Cause
The deep-link heuristic in
umbrielmod/docs.py(_best_anchor) accepts aheading that contains the key only if the section mentions the key as code
(
`scale`,scale = …). Position and scale only says "at scale1.25",so
scalefell back to the table's section.Fix
words are sibling keys of the same table (here
position) or filler words.Top-level sections are not treated as siblings.
umbrielmod/data/docs.json: theoutput.<name>.scalelink is updated.tests/test_docs.pycovers the match and the cases that must keeptheir table link.
Verification
Regenerated the links from Umbriel revision
7ce3efa3ce8b(the bundled one)before and after the change: exactly one link differs,
output.<name>.scale→outputs/?section=position-and-scale. A looser rulewould have redirected
output,workspace,effects.windowand others tounrelated sections.
Users who fetched descriptions via Menu → Update schema and descriptions
get the fix after updating them once more.