mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(docs-infra): prevent automatic linking of 'json' (#44294)
add 'json' to the ignoreGenericWords set so that it doesn't get wrongly linked to the jsonPipe during the aio docs generation as it is a generic javarscript term PR Close #44294
This commit is contained in:
committed by
Dylan Hunn
parent
257a30d7b3
commit
078940150e
@@ -843,7 +843,7 @@ For more information on pipes, see [Pipes](guide/pipes).
|
||||
<code-example hideCopy path="ajs-quick-reference/src/app/app.component.html" region="json"></code-example>
|
||||
|
||||
|
||||
The Angular `json` pipe does the same thing.
|
||||
The Angular [`json`](api/common/JsonPipe) pipe does the same thing.
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -220,7 +220,7 @@ Any unique value will do, but using a descriptive name is helpful.
|
||||
|
||||
2. You can now remove the diagnostic messages that show interpolated values.
|
||||
|
||||
3. To confirm that two-way data binding works for the entire hero model, add a new text binding with the [`json` pipe](api/common/JsonPipe) (which would serialize the data to a string) at the top to the component's template.
|
||||
3. To confirm that two-way data binding works for the entire hero model, add a new text binding with the [`json`](api/common/JsonPipe) pipe (which would serialize the data to a string) at the top to the component's template.
|
||||
|
||||
After these revisions, the form template should look like the following:
|
||||
|
||||
|
||||
+14
-1
@@ -5,6 +5,19 @@
|
||||
*/
|
||||
|
||||
module.exports = function ignoreGenericWords() {
|
||||
const ignoredWords = new Set(['a', 'classes', 'create', 'error', 'group', 'number', 'request', 'state', 'target', 'value', '_']);
|
||||
const ignoredWords = new Set([
|
||||
'a',
|
||||
'classes',
|
||||
'create',
|
||||
'error',
|
||||
'group',
|
||||
'json',
|
||||
'number',
|
||||
'request',
|
||||
'state',
|
||||
'target',
|
||||
'value',
|
||||
'_'
|
||||
]);
|
||||
return (docs, words, index) => ignoredWords.has(words[index].toLowerCase()) ? [] : docs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user