@@ -170,9 +170,12 @@ const createQueries = () => {
170170createQueries . QUERIES = {
171171 // Fixes the references to Markdown pages into the API documentation
172172 markdownUrl : / ^ (? ! [ + a - z A - Z ] + : ) ( [ ^ # ? ] + ) \. m d ( # .+ ) ? $ / ,
173- // ReGeX to match the {Type}<Type> (Structure Type metadatas )
173+ // ReGeX to match the {Type}<Type> (API type references )
174174 // eslint-disable-next-line no-useless-escape
175175 normalizeTypes : / ( \{ | < ) (? ! ) [ a - z A - Z 0 - 9 . | \[ \] \\ ] + (? ! ) ( \} | > ) / g,
176+ // ReGex to match the type API type references that got already parsed
177+ // so that they can be transformed into HTML links
178+ linksWithTypes : / \[ ` < ( [ a - z A - Z 0 - 9 . | \\ [ \] ] + ) > ` \] \( ( .* ) \) / ,
176179 // ReGeX for handling Stability Indexes Metadata
177180 stabilityIndex : / ^ S t a b i l i t y : ( [ 0 - 5 ] ) (?: \s * - \s * ) ? ( .* ) $ / s,
178181 // ReGeX for handling the Stability Index Prefix
@@ -189,6 +192,8 @@ createQueries.UNIST = {
189192 type === 'html' && createQueries . QUERIES . yamlInnerContent . test ( value ) ,
190193 isTextWithType : ( { type, value } ) =>
191194 type === 'text' && createQueries . QUERIES . normalizeTypes . test ( value ) ,
195+ isHtmlWithType : ( { type, value } ) =>
196+ type === 'html' && createQueries . QUERIES . linksWithTypes . test ( value ) ,
192197 isMarkdownUrl : ( { type, url } ) =>
193198 type === 'link' && createQueries . QUERIES . markdownUrl . test ( url ) ,
194199 isHeading : ( { type, depth } ) =>
0 commit comments