Skip to content

Commit 3e7ba3d

Browse files
hawkgskirjs
authored andcommitted
docs: set syntax highlighting to the remaining Markdown code examples blocks (#59088)
There are some code blocks that slipped through the initial Regex-es. Related to #59026 PR Close #59088
1 parent 99c542a commit 3e7ba3d

File tree

39 files changed

+128
-130
lines changed

39 files changed

+128
-130
lines changed

packages/common/http/src/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class HttpRequest<T> {
170170
* To pass a string representation of HTTP parameters in the URL-query-string format,
171171
* the `HttpParamsOptions`' `fromString` may be used. For example:
172172
*
173-
* ```
173+
* ```ts
174174
* new HttpParams({fromString: 'angular=awesome'})
175175
* ```
176176
*/

packages/common/src/directives/ng_optimized_image/ng_optimized_image.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export class NgOptimizedImage implements OnInit, OnChanges {
318318
* descriptors to generate the final `srcset` property of the image.
319319
*
320320
* Example:
321-
* ```
321+
* ```html
322322
* <img ngSrc="hello.jpg" ngSrcset="100w, 200w" /> =>
323323
* <img src="path/hello.jpg" srcset="path/hello.jpg?w=100 100w, path/hello.jpg?w=200 200w" />
324324
* ```

packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export enum ErrorCode {
273273
* The left-hand side of an assignment expression was a template variable. Effectively, the
274274
* template looked like:
275275
*
276-
* ```
276+
* ```html
277277
* <ng-template let-something>
278278
* <button (click)="something = ...">...</button>
279279
* </ng-template>

packages/compiler-cli/src/ngtsc/reflection/src/host.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export interface ClassMember {
153153
*
154154
* For example, the TS code:
155155
*
156-
* ```
156+
* ```ts
157157
* class Clazz {
158158
* static get property(): string {
159159
* return 'value';
@@ -163,7 +163,7 @@ export interface ClassMember {
163163
*
164164
* Downlevels to:
165165
*
166-
* ```
166+
* ```ts
167167
* var Clazz = (function () {
168168
* function Clazz() {
169169
* }
@@ -182,7 +182,7 @@ export interface ClassMember {
182182
* Object.defineProperty ExpressionStatement, but the implementation would be this
183183
* FunctionDeclaration:
184184
*
185-
* ```
185+
* ```ts
186186
* function () {
187187
* return 'value';
188188
* },
@@ -624,7 +624,7 @@ export interface ReflectionHost {
624624
* If the declaration is in a different module, and that module is imported via an absolute path,
625625
* this method also returns the absolute path of the imported module. For example, if the code is:
626626
*
627-
* ```
627+
* ```ts
628628
* import {RouterModule} from '@angular/core';
629629
*
630630
* export const ROUTES = RouterModule.forRoot([...]);

packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,13 @@ export class TypeScriptReflectionHost implements ReflectionHost {
319319
*
320320
* For example, if the identifier is the `Directive` part of a qualified type chain like:
321321
*
322-
* ```
322+
* ```ts
323323
* core.Directive
324324
* ```
325325
*
326326
* then it might be that `core` is a namespace import such as:
327327
*
328-
* ```
328+
* ```ts
329329
* import * as core from 'tslib';
330330
* ```
331331
*

packages/compiler-cli/src/ngtsc/typecheck/api/symbols.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export interface ReferenceSymbol {
190190
/**
191191
* The location in the shim file of a variable that holds the type of the local ref.
192192
* For example, a reference declaration like the following:
193-
* ```
193+
* ```ts
194194
* var _t1 = document.createElement('div');
195195
* var _t2 = _t1; // This is the reference declaration
196196
* ```

packages/compiler/src/core.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ export const enum AttributeMarker {
221221
* ## Example:
222222
*
223223
* Given:
224-
* ```
225-
* <div class="foo bar baz">...<d/vi>
224+
* ```html
225+
* <div class="foo bar baz">...</div>
226226
* ```
227227
*
228228
* the generated code is:
229-
* ```
229+
* ```ts
230230
* var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
231231
* ```
232232
*/
@@ -240,12 +240,12 @@ export const enum AttributeMarker {
240240
* ## Example:
241241
*
242242
* Given:
243-
* ```
243+
* ```html
244244
* <div style="width:100px; height:200px; color:red">...</div>
245245
* ```
246246
*
247247
* the generated code is:
248-
* ```
248+
* ```ts
249249
* var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
250250
* ```
251251
*/
@@ -256,13 +256,13 @@ export const enum AttributeMarker {
256256
*
257257
* For example, given the following HTML:
258258
*
259-
* ```
259+
* ```html
260260
* <div moo="car" [foo]="exp" (bar)="doSth()">
261261
* ```
262262
*
263263
* the generated code is:
264264
*
265-
* ```
265+
* ```ts
266266
* var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
267267
* ```
268268
*/
@@ -273,7 +273,7 @@ export const enum AttributeMarker {
273273
*
274274
* For example, given the following HTML:
275275
*
276-
* ```
276+
* ```html
277277
* <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
278278
* ```
279279
*
@@ -298,7 +298,7 @@ export const enum AttributeMarker {
298298
*
299299
* For example, given the following HTML:
300300
*
301-
* ```
301+
* ```html
302302
* <h1 attr="value" ngProjectAs="[title]">
303303
* ```
304304
*
@@ -315,14 +315,15 @@ export const enum AttributeMarker {
315315
*
316316
* For example, given the following HTML:
317317
*
318-
* ```
318+
* ```html
319319
* <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
320320
* ```
321321
*
322322
* the generated code is:
323323
*
324-
* ```
324+
* ```ts
325325
* var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
326+
* ```
326327
*/
327328
I18n = 6,
328329
}

packages/compiler/src/expression_parser/parser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class Parser {
176176
* parsing errors in case the given expression is invalid.
177177
*
178178
* For example,
179-
* ```
179+
* ```html
180180
* <div *ngFor="let item of items">
181181
* ^ ^ absoluteValueOffset for `templateValue`
182182
* absoluteKeyOffset for `templateKey`
@@ -187,7 +187,7 @@ export class Parser {
187187
* 3. ngForOf -> items
188188
*
189189
* This is apparent from the de-sugared template:
190-
* ```
190+
* ```html
191191
* <ng-template ngFor let-item [ngForOf]="items">
192192
* ```
193193
*
@@ -1215,7 +1215,7 @@ class _ParseAST {
12151215
* parsing errors in case the given expression is invalid.
12161216
*
12171217
* For example,
1218-
* ```
1218+
* ```html
12191219
* <div *ngFor="let item of items; index as i; trackBy: func">
12201220
* ```
12211221
* contains five bindings:

packages/compiler/src/render3/view/api.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const enum DeclarationListEmitMode {
156156
/**
157157
* The list of declarations is emitted into the generated code as is.
158158
*
159-
* ```
159+
* ```ts
160160
* directives: [MyDir],
161161
* ```
162162
*/
@@ -166,7 +166,7 @@ export const enum DeclarationListEmitMode {
166166
* The list of declarations is emitted into the generated code wrapped inside a closure, which
167167
* is needed when at least one declaration is a forward reference.
168168
*
169-
* ```
169+
* ```ts
170170
* directives: function () { return [MyDir, ForwardDir]; },
171171
* ```
172172
*/
@@ -180,13 +180,13 @@ export const enum DeclarationListEmitMode {
180180
* any forward references within the list are resolved when the outer closure is invoked.
181181
*
182182
* Consider the case where the runtime has captured two declarations in two distinct values:
183-
* ```
183+
* ```ts
184184
* const dirA = MyDir;
185185
* const dirB = forwardRef(function() { return ForwardRef; });
186186
* ```
187187
*
188188
* This mode would emit the declarations captured in `dirA` and `dirB` as follows:
189-
* ```
189+
* ```ts
190190
* directives: function () { return [dirA, dirB].map(ng.resolveForwardRef); },
191191
* ```
192192
*/

packages/compiler/src/shadow_css.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export class ShadowCss {
214214
*
215215
* For example, we convert this css:
216216
*
217-
* ```
217+
* ```scss
218218
* .box {
219219
* animation: box-animation 1s forwards;
220220
* }
@@ -228,7 +228,7 @@ export class ShadowCss {
228228
*
229229
* to this:
230230
*
231-
* ```
231+
* ```scss
232232
* .box {
233233
* animation: scopeName_box-animation 1s forwards;
234234
* }
@@ -262,7 +262,7 @@ export class ShadowCss {
262262
*
263263
* For example, it takes a rule such as:
264264
*
265-
* ```
265+
* ```scss
266266
* @keyframes box-animation {
267267
* to {
268268
* background-color: green;
@@ -272,7 +272,7 @@ export class ShadowCss {
272272
*
273273
* and returns:
274274
*
275-
* ```
275+
* ```scss
276276
* @keyframes scopeName_box-animation {
277277
* to {
278278
* background-color: green;

0 commit comments

Comments
 (0)