MDN URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
Internal link to "Specifying a function as a parameter"
Clicking on
The arguments supplied to this function are described in the <a>Specifying a function as a parameter</a> section below.
Should move users to…
MDN Content page report details
en-us/web/javascript/reference/global_objects/string/replaceHello, I would like to take this as my first issue.
Sounds great, @kauer3.
I've assigned it to you.
The lines in question are
and
I guess.
So, inspecting the page I can see that both "Specifying a function as a parameter" and "Specifying a string as a parameter" internal links have typos, but the file on GitHub is a bit different and does not contain the typos. How should I proceed?
Hm, okay.
Are you familiar with Node.js and/or git?
If so, you could set up a local environment:
https://github.com/mdn/content#more-substantial-changes
and test the changes there.
If not I can check it out for you.
The idea is to be able to make changes locally (= on your machine) and check whether it fixes the problem. If you need help, let us know.
With git, yes.
I'll check if it works!
The links are working fine, there was no need to change anything.
Hm. As far as I know, at build time, the ID get's lowercased.
Could you submit a PR with both (id and href) using a lowercased version?
It can take up to 48h after a PR gets merged to show up on production.
Ok, so I'll do that to every id and href on this file, not just those mentioned earlier, because all of them are uppercased.
Yes, please! Looking forward to your PR :-)
(I'm going to be offline for the rest of the day)
Oh no. It's either a regression or it's a matter of some code that hasn't landed yet :(
But if the raw HTML is this:
<a href="#Specifying_a_function_as_a_parameter">Specifying a function as a parameter</a>
it should become...
<a href="#specifying_a_function_as_a_parameter">Specifying a function as a parameter</a>
...when it gets rendered out.
I'll take care of looking into this on the Yari side.
Thanks for tracking this, @peterbe
I'm going to make https://github.com/mdn/yari/issues/2763 a priority. What's happening is that the anchor links only get "corrected" in build-time if you have flaw detection enabled. Something we don't have when we run the prod builds.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace now works. Yay! If, at the time of writing/reading this, you still see the old behavior, mess with the casing of the URL pathname so the CDN serves you a "cold" hit rather than something from our 24h caching.