diff --git a/adev/shared-docs/pipeline/api-gen/extraction/interpolate_code_examples.ts b/adev/shared-docs/pipeline/api-gen/extraction/interpolate_code_examples.ts index 91e9ac1df59..094902c1b00 100644 --- a/adev/shared-docs/pipeline/api-gen/extraction/interpolate_code_examples.ts +++ b/adev/shared-docs/pipeline/api-gen/extraction/interpolate_code_examples.ts @@ -43,6 +43,7 @@ const MD_CTYPE_MAP: {[key in FileType]: string} = { export function interpolateCodeExamples(entries: DocEntry[]): void { for (const entry of entries) { entry.rawComment = replaceExample(entry.rawComment); + entry.description = replaceExample(entry.description); for (const jsdocTag of entry.jsdocTags) { jsdocTag.comment = replaceExample(jsdocTag.comment); diff --git a/adev/shared-docs/pipeline/api-gen/extraction/test/interpolate_code_examples.spec.ts b/adev/shared-docs/pipeline/api-gen/extraction/test/interpolate_code_examples.spec.ts index 3cd40b38abc..c0aa3780f16 100644 --- a/adev/shared-docs/pipeline/api-gen/extraction/test/interpolate_code_examples.spec.ts +++ b/adev/shared-docs/pipeline/api-gen/extraction/test/interpolate_code_examples.spec.ts @@ -15,7 +15,7 @@ const tsMdBlock = (code: string) => '```angular-ts\n' + code + '\n```'; const htmlMdBlock = (code: string) => '```angular-html\n' + code + '\n```'; const entriesBuilder = (comment: string): DocEntry[] => [ - {jsdocTags: [], rawComment: comment} as unknown as DocEntry, + {jsdocTags: [], rawComment: comment, description: ''} as unknown as DocEntry, ]; const getComment = (entries: DocEntry[]) => entries[0].rawComment; @@ -35,6 +35,7 @@ describe('interpolate_code_examples', () => { }, ], rawComment: `{@example dummy/jsdocs_raw.ts region='function'}`, + description: `{@example dummy/jsdocs_raw.ts region='function'}`, }, ];