@@ -10,6 +10,7 @@ import createMetadata from '../../../metadata.mjs';
1010import createNodeSlugger from '../../../utils/parser/slugger.mjs' ;
1111import createQueries from '../../../utils/queries/index.mjs' ;
1212import { getRemark } from '../../../utils/remark.mjs' ;
13+ import { IGNORE_STABILITY_STEMS } from '../constants.mjs' ;
1314
1415/**
1516 * This generator generates a flattened list of metadata entries from a API doc
@@ -74,6 +75,10 @@ export const parseApiDoc = ({ file, tree }) => {
7475 tree . children . unshift ( createTree ( 'heading' , { depth : 1 } , [ ] ) ) ;
7576 }
7677
78+ // On "About this Documentation", we define the stability indices, and thus
79+ // we don't need to check it for stability references
80+ const ignoreStability = IGNORE_STABILITY_STEMS . includes ( file . stem ) ;
81+
7782 // Handles iterating the tree and creating subtrees for each API doc entry
7883 // where an API doc entry is defined by a Heading Node
7984 // (so all elements after a Heading until the next Heading)
@@ -110,7 +115,7 @@ export const parseApiDoc = ({ file, tree }) => {
110115 // Visits all Stability Index nodes from the current subtree if there's any
111116 // and then apply the Stability Index metadata to the current metadata entry
112117 visit ( subTree , createQueries . UNIST . isStabilityNode , node =>
113- addStabilityMetadata ( node , apiEntryMetadata )
118+ addStabilityMetadata ( node , ignoreStability ? undefined : apiEntryMetadata )
114119 ) ;
115120
116121 // Visits all HTML nodes from the current subtree and if there's any that matches
0 commit comments