Use jsxref shortform for null, this, delete, new, instanceof#44221
Conversation
Adds `Reference/{null,this,delete,new,instanceof}` →
`Reference/Operators/{...}` so `{{jsxref("name")}}` shortform resolves
directly via the first lookup path in `jsxref`.
Replaces `{{jsxref("Operators/X", "X")}}` with `{{jsxref("X")}}` for
`null`, `this`, `delete`, `new`, and `instanceof` across 66 files.
Resolution now goes through the `Reference/X` redirects added in the
prior commit and the `Reference` slug index in rari@jsxref-with-index.
Longforms with custom display text (e.g. `"delete x"`, `"deleted"`,
`"x instanceof y"`) are preserved as-is.
Preview URLs (66 pages)
Flaws (107)Found an unexpected or unresolvable flaw? Please report it here. URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
External URLs (4)URL:
URL:
URL:
|
…ator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…ator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…ator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…ator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…perator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…ator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…perator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
…perator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
* fix(fr): translate localized JS namespace prefixes in `jsxref` args
`Instructions/`, `Opérateurs/`, `Objets_globaux/`, `Fonctions/`, and
similar locale-translated path prefixes don't resolve against the
en-US `jsxref` index. Rewrite to the canonical en-US prefixes
(`Statements/`, `Operators/`, `Global_Objects/`, `Functions/`).
* fix(fr): rewrite `@@<name>` to `Symbol.<name>` in `jsxref` args
The `@@iterator` / `@@species` / etc. notation is the old MDN
convention for well-known symbol properties. Canonical pages now
live under `Symbol.<name>` (e.g. `Symbol.iterator`). Update the
macro args to match and insert a `/` so the normalization step
(`.` -> `/`) doesn't split the `Symbol.` qualifier.
* fix(fr): strip trailing `.prototype` from `jsxref` class refs
`{{jsxref("Object.prototype")}}` and similar refs were producing
broken links because no `Object/prototype` page exists; the class
page (`Object`, `Array`, etc.) documents `.prototype` directly.
Rewrite to link to the class page.
* fix(fr): rewrite `Proxy.handler.X` to `Proxy/Proxy/X` in `jsxref` args
The handler-trap pages live under `Global_Objects/Proxy/Proxy/<trap>`;
the old `Proxy.handler` namespace was retired. Update the macro
args to point at the canonical paths.
* fix(fr): rewrite stale Operators aggregate-page refs in `jsxref`
The old `Operators/<Group>_Operators` slugs and related obsolete
leaves (e.g. `Spread_operator`, `Nullish_coalescing_operator`)
redirect under the en-US slug graph but never reach the canonical
pages cleanly. Rewrite the first arg to the current canonical
sub-path.
* fix(fr): rewrite localized `Functions/<leaf>` refs in `jsxref`
`Functions/Fonctions_fléchées` and
`Functions/Valeurs_par_défaut_des_arguments` (French translations
of the canonical English leaf names) don't resolve under the en-US
canonical path. Rewrite to `Functions/Arrow_functions` and
`Functions/Default_parameters`.
* fix(fr): translate French leaf slugs to canonical en-US in `jsxref`
Cover the residual French-translated leaves that weren't reached
by the en-US namespace-prefix sweep:
- `Operators/L_opérateur_<x>` -> `Operators/<x>` (delete, function,
new, in, this, typeof, void, instanceof, yield, class, …);
`L_opérateur_get`/`set` map to `Functions/get`/`Functions/set`.
- `Operators/Opérateurs_de_comparaison` -> `Operators`.
- `Operators/Affecter_par_décomposition` -> `Operators/Destructuring`.
- `Statements/bloc`/`vide`/`for_each...in` -> `block`/`Empty`/
`Deprecated_and_obsolete_features`.
- `Functions/paramètres_du_reste`/`Définition_de_méthode`/
`arguments.length` -> canonical en-US sub-paths.
- Bare `Fonctions`/`Les_protocoles_iteration`/`Grammaire_lexicale`
-> `Functions`/`Iteration_protocols`/`Lexical_grammar`.
- `Instruction/function*` (singular typo) -> `Statements/function*`.
* fix(fr): rewrite `Opérateurs_d_affectation` refs in `jsxref`
The French slug `Operators/Opérateurs_d_affectation` mirrors the
en-US `Operators/Assignment_Operators` that was split into
`Operators#Assignment_operators`. Rewrite the macro to use the
canonical `Operators` page with the `Assignment_operators` anchor.
* fix(fr): translate residual French operator slugs in `jsxref`
Cover three more French-translated operator leaves the previous
sweep missed: `Syntaxe_décomposition` -> `Spread_syntax`,
`Initialisateur_objet` -> `Object_initializer`, and
`L_opérateur_virgule` -> `Comma_operator`.
* fix(fr): rewrite `Global_Objects/Proxy/handler[/X]` to `Proxy/Proxy[/X]`
The slash-form full-path Proxy handler refs weren't covered by the
earlier dot-form (`Proxy.handler.X`) sweep. The handler-trap pages
now live under `Global_Objects/Proxy/Proxy/<trap>`; rewrite the
full-path form to match.
* fix(fr): rewrite stale `jsxref` args to canonical slugs
Each old slug below resolves only via an en-US redirect; wire the
macro to the canonical sub-path so the link doesn't hop:
- `null` (bare) -> `Operators/null` (preserve display "null").
- `eval` (bare) -> `Global_Objects/eval` (preserve display "eval").
- `Global_Objects/null` -> `Operators/null`.
- `Global_Objects/String/contains` -> `Global_Objects/String/includes`.
- `Global_Objects/TypedArray/name` -> `Global_Objects/Function/name`.
- `Statements/default` -> `Statements/switch`.
- `instructions/const` (lowercase typo) -> `Statements/const`.
* fix(fr): point `arguments.caller` ref at `Function.prototype.caller`
There is no `arguments/caller` page (the property was removed). The
closest canonical reference is `Global_Objects/Function/caller`,
which documents the same deprecated mechanism on the function
prototype. Preserve the original `arguments.caller` display text.
* fix(fr): rewrite stale `jsxref` arg variants to canonical slugs
Cover dotted/parenthesized forms missed by the prior pass:
- `eval()` (with parens) -> `Global_Objects/eval`.
- `String.prototype.contains[()]` -> `String.prototype.includes[()]`.
- `TypedArray.name` -> `Function.name` (inherited from
`Function.prototype`).
- `<Wrapper>.prototype.toSource[()]` (`Object`/`Array`/`Boolean`/
`Error`/`Number`/`String`) -> `.toString[()]` (the redirect target
for all removed `toSource` wrappers).
When the macro had no explicit display arg, the original (pre-rewrite)
arg is inserted as the display text so the rendered label keeps
reflecting what the author wrote (e.g. \"contains\" remains visible
even though the link now goes to \`includes\`).
* fix(fr): strip redundant `Global_Objects/` prefix from `jsxref` args
When the macro arg starts with `Global_Objects/`, strip the prefix
and convert any inner `/` separators to `.` so the bare/dotted
identifier (e.g. `Array`, `Math.hypot`, `Number.EPSILON`) resolves
to the same canonical page through the en-US JS Reference index.
When the explicit display arg is redundant (matches the dotted
form, e.g. `("Global_Objects/Array", "Array")`), drop it so the
default rendering takes over.
Guards:
- Skip if the suffix already contains `.` (e.g.
`Global_Objects/RegExp/Symbol.match`), since the macro's
`.` -> `/` normalization can't be reversed.
- Drop the redundant display only when arg2 is the last positional
arg, to keep `anchor`/`no_code` in their original slots.
* fix(fr): restore `Global_Objects/` prefix for `jsxref(\"eval\"…)` refs
Currently-published Rari can't resolve bare `eval`/`eval()` in
`jsxref` because there is no `/Web/JavaScript/Reference/eval`
page or redirect — mdn/content keeps the explicit
`Global_Objects/eval` prefix consistently. The earlier
simplification sweep stripped the prefix where I shouldn't have;
restore it (display arg preserved).
* fix(fr): merge `("foo", "foo()")` into `("foo()")` in `jsxref`
The macro strips `()` for URL resolution, so adding the parens to
arg1 doesn't change the link target — but the displayed text keeps
the parens (display defaults to api_name). This drops the
redundant arg2 when display equals arg1 + `()`, e.g.
`{{jsxref("Math.hypot", "Math.hypot()")}}` ->
`{{jsxref("Math.hypot()")}}`.
Only merges when arg2 is the last positional arg, to keep
anchor/no_code in their slots. The fr-specific
`{{jsxref("Global_Objects/eval", "eval()")}}` form is left alone
(arg2 "eval()" does not match arg1 "Global_Objects/eval" + "()").
* fix(fr): case-correct `jsxref` slugs surfaced by index-aware resolver
Lowercase JS class names (`string`/`boolean`/`object`/`promise`/`array`)
→ canonical capitalized form; lowercase namespace slugs
(`statements/<X>`, `operators/new`) → canonical capitalized;
`int32Array` (lowercase `i` typo) → `Int32Array`; `Map/foreach` →
`Map/forEach`. Display preservation keeps the original (mis-cased)
form rendered so the link text is unchanged.
* fix(fr): case-correct French residuals and stale slugs (round 2)
Round 2 of the index-aware rari sweep:
- Localized namespace prefixes missed by the round-1 sweep:
`Erreurs/<X>` → `Errors/<X>` (3 calls); the French long-form
`Fonctions_et_portee_des_fonctions/Strict_mode` → `Functions/Strict_mode`.
- French-translated `Booléen`/`booléen` → `Boolean` with display
preservation (keeps the French wording rendered).
- Stale slugs (newer additions to the universal redirect map):
bare `uneval()` → `Deprecated_and_obsolete_features`,
`Function/prototype` slug form → `Function`.
* fix(fr): rewrite residual stale `jsxref` slugs and a typo (round 3)
- `Functions/Strict_mode` and `Errors/Not_a_codepoint` weren't in the
redirect-targets map yet; add them (`Strict_mode` is root-level, not
under `Functions/`; `Not_a_codepoint` was renamed to
`Not_a_valid_code_point`).
- Fix typo `String. prototype. prototype. split ()` (literal spaces +
duplicate `prototype` segment) → `String.prototype.split()`.
* fix(fr): rewrite bare `<IntlClass>` and bare `this` for rari@main (round 4)
Two patterns that resolve under the index-aware rari but break under
the deployed rari:
- Bare Intl class refs (`Collator`, `DateTimeFormat`, `NumberFormat`)
→ `Intl/<Class>` form. The index-aware rari has a namespace-strip
alias; deployed rari falls back through `Global_Objects/<Class>`
which redirects, surfacing as `templ-redirected-link`.
- Bare `this` → `Operators/this`. The index-aware rari has a leaf
shortcut; deployed rari produces a `templ-broken-link`.
Added `this` to the cross-locale `SIMPLE_RENAMES_REDIRECTS` map for
future runs.
* fix(fr): drop redundant display arg when arg1 and arg2 differ only in case
Over-zealous display preservation inserted by the case-fix sweep:
`{{jsxref("Object", "object")}}` was meant to keep "object" rendered,
but for JS type references the canonical (capitalized) class name
should also be the rendered text. Drop the redundant arg2 when it
matches arg1 case-insensitively — covers `Object`/`String`/`Number`/
`Array`/`Boolean`/`Promise`/`Symbol`/`undefined` and any other
mis-cased pair caught by the index-aware rari.
Only drops arg2 when it's the last positional arg (same safety policy
as `merge-parens-display`).
* fix(fr): rewrite `Proxy.Proxy[.X]` (dotted) to `Proxy/Proxy[/X]` (slash) in `jsxref`
The dotted form implies `Proxy.Proxy.X` is a valid JS member access,
but `Proxy.Proxy.<trap>` is not a real namespace — `Proxy/Proxy/<trap>`
is just MDN's URL convention for the constructor + handler-trap
sub-pages. Switch to the slash form everywhere so the rendered default
display doesn't suggest a namespaced `Proxy.Proxy.X` access pattern.
Display args are preserved as-is where set.
* fix(fr): collapse `("Operators/<kw>", "<kw>")` to `("<kw>")` for operator shorthands
Use the bare-keyword shortform for the 5 operator keywords `null`,
`this`, `delete`, `new`, `instanceof` per the convention introduced
in mdn/content#44221. The shortform resolves cleanly on current rari
thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>`
redirects that PR added, and resolves natively under the index-aware
rari from mdn/rari#715.
Only collapses the redundant-display pattern (`("Operators/X", "X")`);
longforms with custom display text (`"delete x"`, `"deleted"`,
`"x instanceof y"`) are preserved.
* fix(fr): add `Reference/<kw>` redirects for operator shorthands
Mirrors the en-US redirects added in mdn/content#44221 for the 5
operator-keyword shorthands (`null`, `this`, `delete`, `new`,
`instanceof`). Without these per-locale redirects, the bare-keyword
`{{jsxref("null")}}` shortform produces a 404 under the deployed
rari; with them, it falls back via redirect to the canonical
`Reference/Operators/<kw>` page. The index-aware rari from
mdn/rari#715 resolves the shortform directly without needing the
redirect.
* Apply suggestions from code review
Co-authored-by: Tristan D. <tristantheb@users.noreply.github.com>
* apply change for FF40 like en-US `String.prototype.contains`
Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
---------
Co-authored-by: Tristan D. <tristantheb@users.noreply.github.com>
* fix(pt-br): rewrite `@@<name>` to `Symbol.<name>` in `jsxref` args
The `@@iterator` / `@@species` / etc. notation is the old MDN
convention for well-known symbol properties. Canonical pages now
live under `Symbol.<name>` (e.g. `Symbol.iterator`). Update the
macro args to match and insert a `/` so the normalization step
(`.` -> `/`) doesn't split the `Symbol.` qualifier.
* fix(pt-br): strip trailing `.prototype` from `jsxref` class refs
`{{jsxref("Object.prototype")}}` and similar refs were producing
broken links because no `Object/prototype` page exists; the class
page (`Object`, `Array`, etc.) documents `.prototype` directly.
Rewrite to link to the class page.
* fix(pt-br): rewrite `Proxy.handler.X` to `Proxy/Proxy/X` in `jsxref` args
The handler-trap pages live under `Global_Objects/Proxy/Proxy/<trap>`;
the old `Proxy.handler` namespace was retired. Update the macro
args to point at the canonical paths.
* fix(pt-br): rewrite stale Operators aggregate-page refs in `jsxref`
The old `Operators/<Group>_Operators` slugs (Arithmetic, Bitwise,
Comparison, Logical) and related obsolete leaves
(`Destructuring_assignment`, `Legacy_generator_function`,
`Logical_nullish_assignment`, `Nullish_coalescing_operator`,
`Spread_operator`) redirect under the en-US slug graph but never
reach the canonical pages cleanly. Rewrite the first arg to the
current canonical sub-path.
* fix(pt-br): rewrite `Operators/Assignment_Operators` refs in `jsxref`
The old slug redirects to `Operators#Assignment_operators`. Rewrite
the macro to use the canonical `Operators` page; existing anchors
on the call site are preserved.
* fix(pt-br): rewrite obsolete Operators expression-form refs in `jsxref`
`Operators/Array_comprehensions`, `Operators/Generator_comprehensions`,
`Operators/Expression_closures`, and `Statements/Legacy_generator_function`
were removed from JavaScript. Rewrite the macro args to point at
`Deprecated_and_obsolete_features`.
* fix(pt-br): rewrite additional `Functions/*` refs in `jsxref`
Cover the bare and member forms of the legacy `Functions_and_function_scope`
namespace and the misplaced `Functions/Strict_mode` (canonical: `Functions`,
`Functions/arguments`, `Strict_mode`).
* fix(pt-br): rewrite `Global_Objects/<IntlClass>` refs to `Intl/<IntlClass>`
Intl member classes live under `Global_Objects/Intl/`; the top-level
`Global_Objects/<Class>` slug is only a redirect.
* fix(pt-br): rewrite `Global_Objects/Proxy/handler[/X]` to `Proxy/Proxy[/X]`
The Proxy constructor page was renamed; the handler-trap namespace
now lives under `Global_Objects/Proxy/Proxy/<trap>`.
* fix(pt-br): rewrite stale `jsxref` args to canonical slugs
Rewrite arg1 for slugs that en-US redirects resolve cleanly so the
macro doesn't hop: bare `null`/`eval[()]`, `Global_Objects/null`,
`Operators/get`/`set`, `Global_Objects/<X>/toSource`,
`<X>.prototype.toSource[()]`, `Global_Objects/TypedArray/name`,
`TypedArray.name`, `Global_Objects/Array/flatten`,
`Global_Objects/Date/toGMTString`, `Global_Objects/uneval` (and bare),
`Object.toSource[()]`, `Atomics.wake[()]` → `Atomics.notify[()]`,
`Functions_and_function_scope/arguments/length` → `Functions/`,
`Functions_and_function_scope/Strict_mode` → `Strict_mode`,
`<Class>.Symbol.species` → `<Class>/Symbol.species`.
* fix(pt-br): strip redundant `Global_Objects/` prefix from `jsxref` args
Strip the `Global_Objects/` prefix when safe — display arg2 is dropped
only when it's the last positional arg and equals the post-strip
default. Skips dotted-leaf suffixes and bare `eval`.
* fix(pt-br): merge `("foo", "foo()")` into `("foo()")` in `jsxref`
The macro strips `()` for URL resolution but keeps it in the default
display, so arg2 is redundant when it only adds parens to arg1. Only
drops arg2 when it's the last positional arg.
* fix(pt-br): rewrite bare/dotted `<IntlClass>` refs to `Intl/<IntlClass>`
`{{jsxref("NumberFormat")}}` and friends resolve via redirect because
the canonical page lives under `Global_Objects/Intl/<Class>`. Rewrite
the bare and dotted forms to the canonical `Intl/<Class>` path. When
no explicit display arg is set, insert the original arg as the
display text so the rendered label keeps reflecting what the author
originally wrote.
* fix(pt-br): convert WebAssembly `jsxref` refs to markdown links
WebAssembly was moved out of `Web/JavaScript/Reference/Global_Objects/`
and now lives at `/WebAssembly/Reference/JavaScript_interface/`. The
`jsxref` macro is scoped to JS Reference, so `WebAssembly.<X>` refs
all surface as `templ-redirected-link`. Convert them to plain markdown
links pointing at the canonical WebAssembly path.
Display preservation: keep an explicit display arg when set; otherwise
use the dotted `WebAssembly.<X>` form (with parens preserved when arg1
had them) so the rendered label is unchanged.
* fix(pt-br): normalize lowercase `Global_objects/` and convert WebAssembly refs
`files/pt-br/webassembly/index.md` had `jsxref("Global_objects/…")`
(lowercase `o`) args that were missed by the earlier round-1
localized-namespace sweep. Normalize them to canonical
`Global_Objects/` and then convert the WebAssembly subset to plain
markdown links pointing at `/pt-BR/docs/WebAssembly/Reference/JavaScript_interface/<X>`.
* fix(pt-br): translate Portuguese leaf slugs to canonical en-US in `jsxref`
Cover residual Portuguese-translated leaves that weren't reached by
the en-US namespace-prefix sweep:
- `Erro de sintaxe` / `Errodesintaxe` (PT: "syntax error") → `SyntaxError`.
- `Função` (PT: "function") → `Function`.
- `declaração/block` (PT: "statement/block") → `Statements/block`.
- `Statements/funcoes_assincronas` (PT-lowercase: "async functions") →
`Statements/async_function`.
Display preservation: when the macro had no explicit display arg, the
original Portuguese term is inserted as the display so the rendered
label keeps reflecting the translator's wording.
* fix(pt-br): clean up `jsxref` typos and stale one-offs
Mechanical edits not covered by the bulk sweeps:
- Strip stray spaces around `/` in slug args (`Global_objects / ArrayBuffer`,
`Statements/for ... of`) and inside the macro paren (`jsxref ( "…"`).
- Strip stray spaces before `()` (`String.prototype.indexOf ()`,
`String.prototype.slice ()`, `Object.prototype.hasOwnProperty ()`).
- Strip stray spaces in arg1 (`String. prototype.matchAll() `).
- `Strict_mod` (truncated) → `Strict_mode`.
- `Element`/`NodeList`/`ArrayBufferView` are DOM types — swap `jsxref`
for `domxref`.
- Mirror the fr decision: `Functions/arguments/caller` →
`Function.prototype.caller`.
* fix(pt-br): case-correct `jsxref` slugs surfaced by index-aware resolver
Lowercase JS class names (`string`/`boolean`/`number`/`object`/
`promise`/`array`/`symbol`) → canonical capitalized form;
`Operators/Conditional_Operator`/`Comma_Operator`/`Function`/
`Operator_Precedence`/`Property_Accessors` → lowercase suffix;
method-name typos (`Date/valueof` → `valueOf`, `Map/foreach` →
`forEach`, `object/defineProperty`/`defineProperties` → `Object/`);
lowercase namespace slugs (`statements/`/`operators/`/`functions/`/
`classes`) → canonical capitalized; `Classes/Constructor` → lowercase
`constructor`; `Regexp/` → `RegExp/`; `Intl/DatetimeFormat` →
`DateTimeFormat`; `Statements/empty` → `Empty`;
`Global_objects/` → `Global_Objects/`; `template_literals` →
`Template_literals`; `Errors/Strict_Non_Simple_Params` casing.
Also resolve the bare `function` ambiguous arg (matches both
`Operators/function` and `Statements/function`) by picking the
expression form — all observed call sites are callback parameters in
WebAPI pages.
Display preservation keeps the original (mis-cased) form rendered so
the link text is unchanged.
* fix(pt-br): case-correct residual dotted-form `jsxref` slugs
Round 2 of the case-fix sweep covering the dotted variants the round-1
mapping missed: `Date.valueof` → `Date.valueOf`, `Map.foreach` →
`Map.forEach`, `Regexp.<member>` → `RegExp.<member>` (for
`global`/`ignoreCase`/`multiline`/`sticky`), `object.defineProperty`/
`defineProperties` → `Object.`, and `Operators/conditional_operator`
(uppercase Operators, lowercase Conditional) → `Operators/Conditional_operator`.
* fix(pt-br): drop redundant display arg when arg1 and arg2 differ only in case
Over-zealous display preservation inserted by the case-fix sweep:
`{{jsxref("Object", "object")}}` was meant to keep "object" rendered,
but for JS type references the canonical (capitalized) class name
should also be the rendered text. Drop the redundant arg2 when it
matches arg1 case-insensitively — covers `Object`/`String`/`Number`/
`Array`/`Boolean`/`Promise`/`Symbol`/`undefined` and any other
mis-cased pair caught by the index-aware rari.
Only drops arg2 when it's the last positional arg (same safety policy
as `merge-parens-display`).
* fix(pt-br): rewrite `Proxy.Proxy[.X]` (dotted) to `Proxy/Proxy[/X]` (slash) in `jsxref`
The dotted form implies `Proxy.Proxy.X` is a valid JS member access,
but `Proxy.Proxy.<trap>` is not a real namespace — `Proxy/Proxy/<trap>`
is just MDN's URL convention for the constructor + handler-trap
sub-pages. Switch to the slash form everywhere so the rendered default
display doesn't suggest a namespaced `Proxy.Proxy.X` access pattern.
Display args are preserved as-is where set.
* fix(pt-br): collapse `("Operators/<kw>", "<kw>")` to `("<kw>")` for operator shorthands
Use the bare-keyword shortform for the 5 operator keywords `null`,
`this`, `delete`, `new`, `instanceof` per the convention introduced
in mdn/content#44221. The shortform resolves cleanly on current rari
thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>`
redirects that PR added, and resolves natively under the index-aware
rari from mdn/rari#715.
Only collapses the redundant-display pattern (`("Operators/X", "X")`);
longforms with custom display text (`"delete x"`, `"deleted"`,
`"x instanceof y"`) are preserved.
* fix(pt-br): add `Reference/<kw>` redirects for operator shorthands
Mirrors the en-US redirects added in mdn/content#44221 for the 5
operator-keyword shorthands (`null`, `this`, `delete`, `new`,
`instanceof`). Without these per-locale redirects, the bare-keyword
`{{jsxref("null")}}` shortform produces a 404 under the deployed
rari; with them, it falls back via redirect to the canonical
`Reference/Operators/<kw>` page. The index-aware rari from
mdn/rari#715 resolves the shortform directly without needing the
redirect.
* fix(pt-br): keep longform `("Operators/delete", "delete")` (target page missing)
`Web/JavaScript/Reference/Operators/delete` is not translated in
pt-br, so the per-locale redirect can't point there and the bare
shortform would 404. Restore the longform for `delete` only;
`null`/`this`/`new`/`instanceof` keep the shortform.
…ator shorthands Use the bare-keyword shortform for the 5 operator keywords `null`, `this`, `delete`, `new`, `instanceof` per the convention introduced in mdn/content#44221. The shortform resolves cleanly on current rari thanks to the `Reference/<kw>` -> `Reference/Operators/<kw>` redirects that PR added, and resolves natively under the index-aware rari from mdn/rari#715. Only collapses the redundant-display pattern (`("Operators/X", "X")`); longforms with custom display text (`"delete x"`, `"deleted"`, `"x instanceof y"`) are preserved.
Mirrors the en-US redirects added in mdn/content#44221 for the 5 operator-keyword shorthands (`null`, `this`, `delete`, `new`, `instanceof`). Without these per-locale redirects, the bare-keyword `{{jsxref("null")}}` shortform produces a 404 under the deployed rari; with them, it falls back via redirect to the canonical `Reference/Operators/<kw>` page. The index-aware rari from mdn/rari#715 resolves the shortform directly without needing the redirect.
Description
Update jsxref references to use the bare-keyword shortform for five JavaScript operator keywords whose canonical pages live under
Web/JavaScript/Reference/Operators/:{{jsxref("Operators/null", "null")}}→{{jsxref("null")}}{{jsxref("Operators/this", "this")}}→{{jsxref("this")}}{{jsxref("Operators/delete", "delete")}}→{{jsxref("delete")}}{{jsxref("Operators/new", "new")}}→{{jsxref("new")}}{{jsxref("Operators/instanceof", "instanceof")}}→{{jsxref("instanceof")}}As a workaround to make the shortform resolve on current rari, also adds the five
Reference/<keyword>→Reference/Operators/<keyword>redirects. With mdn/rari#715, the future jsxref macro supports these bare-keyword references out of the box and the redirects will no longer be load-bearing.Motivation
Make sources easier to read and write: the duplicated arg (
"Operators/foo", "foo") is awkward boilerplate, and the shortform matches howGlobal_Objects/*references already work ({{jsxref("Array")}}rather than{{jsxref("Global_Objects/Array", "Array")}}).Additional details
"delete x","deleted","x instanceof y") are preserved — only the redundant"X", "X"pattern is collapsed.templ-redirected-linkwarning because the rendered href (…/Reference/nulletc.) bounces through the new redirect entries to…/Reference/Operators/null. Those warnings go away with fix(jsxref): build Web/JavaScript index to resolve names rari#715, which builds aWeb/JavaScript/Referenceslug index sojsxrefresolves bare keywords directly to the canonicalOperators/*URL.Related issues and pull requests
Relates to mdn/rari#715