From 7ad1f27d83d35be60eeeef61dcd67c14b3d3d4b2 Mon Sep 17 00:00:00 2001 From: hawkgs Date: Wed, 4 Dec 2024 11:45:48 +0200 Subject: [PATCH] feat(docs-infra): use angular-ts and angular-html shiki highlighting (#59004) Use `angular-ts` instead of `typescript` and `angular-html` instead of `html`. PR Close #59004 --- .../pipeline/api-gen/extraction/interpolate_code_examples.ts | 4 ++-- .../api-gen/extraction/test/interpolate_code_examples.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 607fdb1a800..91e9ac1df59 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 @@ -28,9 +28,9 @@ type FileType = 'ts' | 'js' | 'html'; type RegionStartToken = {name: string; startIdx: number}; const MD_CTYPE_MAP: {[key in FileType]: string} = { - 'ts': 'typescript', + 'ts': 'angular-ts', 'js': 'javascript', - 'html': 'html', + 'html': 'angular-html', }; /** 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 316dfa1a0c7..3cd40b38abc 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 @@ -11,8 +11,8 @@ import {interpolateCodeExamples} from '../interpolate_code_examples'; import {DocEntry} from '@angular/compiler-cli'; import {mockReadFileSync} from './fake-examples'; -const tsMdBlock = (code: string) => '```typescript\n' + code + '\n```'; -const htmlMdBlock = (code: string) => '```html\n' + code + '\n```'; +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,