Yari flaw fixes causing xref macro arguments to be incorrect?
See original GitHub issueIn https://github.com/mdn/content/pull/1236, @nschonni did a bunch of automated flaw fixes, mainly on the links in the affected articles.
I noted that in a couple of cases, xref macro arguments had been changed so they still worked, but the resulting link text was incorrect. For example {{domxref("RandomSource")}}
got changed to {{domxref("Crypto/getRandomValues")}}
, whereas it should be {{domxref("Crypto.getRandomValues")}}
.
This occurred in files/en-us/glossary/rng/index.html
.
Can you have a look into this? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Fix this XREF PROBLEM in AutoCAD - YouTube
Fix this XREF PROBLEM in AutoCADHi friend In this AutoCAD tutorial, I share how to fix xref failed to bind due to proxy...
Read more >KumaScript - O projeto MDN - MDN Web Docs
Executes and returns the result of the named template with the given list of parameters. Example: <%- template("warning", ["foo", "bar", "baz"]) ...
Read more >Xref Macros and Page Links :: Antora Docs
An AsciiDoc xref macro is used to create a source-to-source cross reference from a resource to a publishable resource. The term cross reference,...
Read more >Untitled
#chad Hova mesz, Yitzchak meir helfgot concert, Degeneracy problem particle ... Mossuto's market hours, Kimery events, L'ocell de la revolta argument, ...
Read more >GNU bug reports: package emacs
Package: emacs; Reported by: Stefan Monnier <monnier@HIDDEN>; 43 days old. #59206: rmail-summary-apply-filters-consecutively causes wrong-type-argument error
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@peterbe sure thing. When you use the one-argument version of an xref macro, the slug and the link text are derived from the argument value. The link text is exactly the same as the argument value, whereas the slug fragment is modified if necessary, to the form it needs to be in.
So if you put
{{domxref("Document.body")}}
, the link text will be “Document.body”, but the slug fragment is updated to “Document/body” so the URL is well-formed.But if you put
{{domxref("Document/body")}}
the link text will be"Document/body", which is not what we want (the slug fragment is still correct).There is also a two-argument version, which allows you to specify the slug fragment and link text separately, e.g.
{{domxref("Document/body", "Document.body")}}
. It would be a pain to write this explicitly each time you want to write such a call.Yup, got it in one.