fix(docs-infra): avoid auto-linking generic word `state` (#41438)

Since `state` is a generic word, this commit adds it to the list of
ignored words for auto-linking to avoid incorrectly auto-linking to the
[state()][1] animation helper. For example, see `/ngsw/state` in the
[ServiceWorker in production][2] guide.

[1]: https://v10.angular.io/api/animations/state
[2]: https://v10.angular.io/guide/service-worker-devops#locating-and-analyzing-debugging-information

PR Close #41438
This commit is contained in:
George Kalpakas 2021-04-03 20:42:29 +03:00 committed by atscott
parent ab47f417d6
commit 180c1b555f
1 changed files with 1 additions and 1 deletions

View File

@ -5,6 +5,6 @@
*/
module.exports = function ignoreGenericWords() {
const ignoredWords = new Set(['a', 'classes', 'create', 'error', 'group', 'request', 'target', 'value', '_']);
const ignoredWords = new Set(['a', 'classes', 'create', 'error', 'group', 'request', 'state', 'target', 'value', '_']);
return (docs, words, index) => ignoredWords.has(words[index].toLowerCase()) ? [] : docs;
};