Use human-readable link names in Versioning references #29483
Closed
HonkingGoose
started this conversation in
Suggest an Idea
Replies: 2 comments
This comment has been hidden.
This comment has been hidden.
-
I see that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tell us more.
Intro
Our Versioning docs have a
## References
section with links to upstream references.Those references are "bare links" that are not accessible to screenreader users, or to humans in general.
I would like us to use good, human-readable names in those links instead.
Example
The Renovate docs for azure-rest-api Versioning, has a "bare link":
Source code for example
I think the source is the
modules/versioning/azure-rest-api/index.ts
file, that has aconst urls
array:renovate/lib/modules/versioning/azure-rest-api/index.ts
Lines 8 to 10 in b053ca5
Proposed code fix
Can you have a proper Markdown link in the
urls
constant? I'm thinking of something like this:Write failing test first, then fix code
If the above is suitable, we should write a test that deliberately fails first. That way we know that we're actually fixing the problem in each file.
Pseudo-code for failing test:
index.ts
file in themodules/versioning/*/index.ts
pattern has aconst urls
continue, else ignore the fileurls
array is wrapped between[]()
charactersurls
array is not wrapped between[]()
character: fail testYou may need to adjust the test code so it properly handles cases with only one link, no links, or multiple links. 😉
Beta Was this translation helpful? Give feedback.
All reactions