Skip to content

Commit 40a5070

Browse files
julianobrasiljelbourn
authored andcommitted
docs: escape html tags and close unclosed backticks (#9583)
1 parent ff0e612 commit 40a5070

File tree

28 files changed

+57
-57
lines changed

28 files changed

+57
-57
lines changed

src/cdk/a11y/focus-trap/focus-trap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {DOCUMENT} from '@angular/common';
2727
*
2828
* This class currently uses a relatively simple approach to focus trapping.
2929
* It assumes that the tab order is the same as DOM order, which is not necessarily true.
30-
* Things like tabIndex > 0, flex `order`, and shadow roots can cause to two to misalign.
30+
* Things like `tabIndex > 0`, flex `order`, and shadow roots can cause to two to misalign.
3131
*/
3232
export class FocusTrap {
3333
private _startAnchor: HTMLElement | null;

src/cdk/a11y/interactivity-checker/interactivity-checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function isNativeFormElement(element: Node) {
172172
nodeName === 'textarea';
173173
}
174174

175-
/** Gets whether an element is an <input type="hidden">. */
175+
/** Gets whether an element is an `<input type="hidden">`. */
176176
function isHiddenInput(element: HTMLElement): boolean {
177177
return isInputElement(element) && element.type == 'hidden';
178178
}

src/cdk/platform/features.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function supportsPassiveEventListeners(): boolean {
3030
/** Cached result Set of input types support by the current browser. */
3131
let supportedInputTypes: Set<string>;
3232

33-
/** Types of <input> that *might* be supported. */
33+
/** Types of `<input>` that *might* be supported. */
3434
const candidateInputTypes = [
3535
// `color` must come first. Chrome 56 shows a warning if we change the type to `color` after
3636
// first changing it to something else:

src/cdk/portal/portal-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any
4848
* directly attached to it, enabling declarative use.
4949
*
5050
* Usage:
51-
* <ng-template [cdkPortalOutlet]="greeting"></ng-template>
51+
* `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
5252
*/
5353
@Directive({
5454
selector: '[cdkPortalOutlet], [cdkPortalHost], [portalHost]',

src/lib/autocomplete/autocomplete-trigger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ export class MatAutocompleteTrigger implements ControlValueAccessor, OnDestroy {
133133
/** Stream of keyboard events that can close the panel. */
134134
private readonly _closeKeyEventStream = new Subject<void>();
135135

136-
/** View -> model callback called when value changes */
136+
/** `View -> model callback called when value changes` */
137137
_onChange: (value: any) => void = () => {};
138138

139-
/** View -> model callback called when autocomplete has been touched */
139+
/** `View -> model callback called when autocomplete has been touched` */
140140
_onTouched = () => {};
141141

142142
/** The autocomplete panel to be attached to this trigger. */

src/lib/card/card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export class MatCardHeader {}
180180

181181

182182
/**
183-
* Component intended to be used within the <mat-card> component. It adds styles for a preset
183+
* Component intended to be used within the `<mat-card>` component. It adds styles for a preset
184184
* layout that groups an image with a title section.
185185
* @docs-private
186186
*/

src/lib/checkbox/checkbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAc
175175
/** The value attribute of the native input element */
176176
@Input() value: string;
177177

178-
/** The native `<input type="checkbox"> element */
178+
/** The native `<input type="checkbox">` element */
179179
@ViewChild('input') _inputElement: ElementRef;
180180

181181
/** Reference to the ripple instance of the checkbox. */

src/lib/chips/chip-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface MatChipInputEvent {
2323

2424
/**
2525
* Directive that adds chip-specific behaviors to an input element inside <mat-form-field>.
26-
* May be placed inside or outside of an <mat-chip-list>.
26+
* May be placed inside or outside of an `<mat-chip-list>`.
2727
*/
2828
@Directive({
2929
selector: 'input[matChipInputFor]',

src/lib/chips/chip.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class MatChip extends _MatChipMixinBase implements FocusableOption, OnDes
106106
selected: value
107107
});
108108
}
109-
/** The value of the chip. Defaults to the content inside <mat-chip> tags. */
109+
/** The value of the chip. Defaults to the content inside `<mat-chip>` tags. */
110110
@Input()
111111
get value(): any {
112112
return this._value != undefined
@@ -292,9 +292,9 @@ export class MatChip extends _MatChipMixinBase implements FocusableOption, OnDes
292292
*
293293
* Example:
294294
*
295-
* <mat-chip>
295+
* `<mat-chip>
296296
* <mat-icon matChipRemove>cancel</mat-icon>
297-
* </mat-chip>
297+
* </mat-chip>`
298298
*
299299
* You *may* use a custom icon, but you may need to override the `mat-chip-remove` positioning
300300
* styles to properly center the icon within the chip.

src/lib/core/common-behaviors/error-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function mixinErrorState<T extends Constructor<HasErrorState>>(base: T)
3939

4040
/**
4141
* Stream that emits whenever the state of the input changes such that the wrapping
42-
* `MatFormField needs to run change detection.
42+
* `MatFormField` needs to run change detection.
4343
*/
4444
readonly stateChanges = new Subject<void>();
4545

src/lib/core/option/option.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ export class MatOption implements AfterViewChecked {
205205
}
206206

207207
/**
208-
* Selects the option while indicating the selection came from the user. Used to
209-
* determine if the select's view -> model callback should be invoked.
208+
* `Selects the option while indicating the selection came from the user. Used to
209+
* determine if the select's view -> model callback should be invoked.`
210210
*/
211211
_selectViaInteraction(): void {
212212
if (!this.disabled) {

src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export type MatPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate';
1818
* `mat-primary .mat-pseudo-checkbox`.
1919
*
2020
* Note that this component will be completely invisible to screen-reader users. This is *not*
21-
* interchangeable with <mat-checkbox> and should *not* be used if the user would directly interact
22-
* with the checkbox. The pseudo-checkbox should only be used as an implementation detail of
23-
* more complex components that appropriately handle selected / checked state.
21+
* interchangeable with `<mat-checkbox>` and should *not* be used if the user would directly
22+
* interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail
23+
* of more complex components that appropriately handle selected / checked state.
2424
* @docs-private
2525
*/
2626
@Component({

src/lib/expansion/expansion-panel-header.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import {matExpansionAnimations} from './expansion-animations';
2727

2828

2929
/**
30-
* <mat-expansion-panel-header>
30+
* `<mat-expansion-panel-header>`
3131
*
32-
* This component corresponds to the header element of an <mat-expansion-panel>.
32+
* This component corresponds to the header element of an `<mat-expansion-panel>`.
3333
*/
3434
@Component({
3535
moduleId: module.id,
@@ -136,7 +136,7 @@ export class MatExpansionPanelHeader implements OnDestroy {
136136
}
137137

138138
/**
139-
* <mat-panel-description>
139+
* `<mat-panel-description>`
140140
*
141141
* This direction is to be used inside of the MatExpansionPanelHeader component.
142142
*/
@@ -149,7 +149,7 @@ export class MatExpansionPanelHeader implements OnDestroy {
149149
export class MatExpansionPanelDescription {}
150150

151151
/**
152-
* <mat-panel-title>
152+
* `<mat-panel-title>`
153153
*
154154
* This direction is to be used inside of the MatExpansionPanelHeader component.
155155
*/

src/lib/expansion/expansion-panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type MatExpansionPanelState = 'expanded' | 'collapsed';
4141
let uniqueId = 0;
4242

4343
/**
44-
* <mat-expansion-panel>
44+
* `<mat-expansion-panel>`
4545
*
4646
* This component can be used as a single element to show expandable content, or as one of
4747
* multiple children of an element with the MdAccordion directive attached.

src/lib/grid-list/tile-styler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export abstract class TileStyler {
152152

153153
/**
154154
* This type of styler is instantiated when the user passes in a fixed row height.
155-
* Example <mat-grid-list cols="3" rowHeight="100px">
155+
* Example `<mat-grid-list cols="3" rowHeight="100px">`
156156
* @docs-private
157157
*/
158158
export class FixedTileStyler extends TileStyler {
@@ -188,7 +188,7 @@ export class FixedTileStyler extends TileStyler {
188188

189189
/**
190190
* This type of styler is instantiated when the user passes in a width:height ratio
191-
* for the row height. Example <mat-grid-list cols="3" rowHeight="3:1">
191+
* for the row height. Example `<mat-grid-list cols="3" rowHeight="3:1">`
192192
* @docs-private
193193
*/
194194
export class RatioTileStyler extends TileStyler {
@@ -243,7 +243,7 @@ export class RatioTileStyler extends TileStyler {
243243
/**
244244
* This type of styler is instantiated when the user selects a "fit" row height mode.
245245
* In other words, the row height will reflect the total height of the container divided
246-
* by the number of rows. Example <mat-grid-list cols="3" rowHeight="fit">
246+
* by the number of rows. Example `<mat-grid-list cols="3" rowHeight="fit">`
247247
*
248248
* @docs-private
249249
*/

src/lib/icon/icon-registry.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class SvgIconConfig {
7070
}
7171

7272
/**
73-
* Service to register and display icons used by the <mat-icon> component.
73+
* Service to register and display icons used by the `<mat-icon>` component.
7474
* - Registers icon URLs by namespace and name.
7575
* - Registers icon set URLs by namespace.
7676
* - Registers aliases for CSS classes, for use with icon fonts.
@@ -101,7 +101,7 @@ export class MatIconRegistry {
101101
private _fontCssClassesByAlias = new Map<string, string>();
102102

103103
/**
104-
* The CSS class to apply when an <mat-icon> component has no icon name, url, or font specified.
104+
* The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.
105105
* The default 'material-icons' value assumes that the material icon font has been loaded as
106106
* described at http://google.github.io/material-design-icons/#icon-font-for-the-web
107107
*/
@@ -164,7 +164,7 @@ export class MatIconRegistry {
164164
/**
165165
* Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
166166
* component with the alias as the fontSet input will cause the class name to be applied
167-
* to the <mat-icon> element.
167+
* to the `<mat-icon>` element.
168168
*
169169
* @param alias Alias for the font.
170170
* @param className Class name override to be used instead of the alias.
@@ -183,7 +183,7 @@ export class MatIconRegistry {
183183
}
184184

185185
/**
186-
* Sets the CSS class name to be used for icon fonts when an <mat-icon> component does not
186+
* Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
187187
* have a fontSet input value, and is not loading an icon by name or URL.
188188
*
189189
* @param className
@@ -194,7 +194,7 @@ export class MatIconRegistry {
194194
}
195195

196196
/**
197-
* Returns the CSS class name to be used for icon fonts when an <mat-icon> component does not
197+
* Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
198198
* have a fontSet input value, and is not loading an icon by name or URL.
199199
*/
200200
getDefaultFontSetClass(): string {
@@ -274,7 +274,7 @@ export class MatIconRegistry {
274274
/**
275275
* Attempts to find an icon with the specified name in any of the SVG icon sets.
276276
* First searches the available cached icons for a nested element with a matching name, and
277-
* if found copies the element to a new <svg> element. If not found, fetches all icon sets
277+
* if found copies the element to a new `<svg>` element. If not found, fetches all icon sets
278278
* that have not been cached, and searches again after all fetches are completed.
279279
* The returned Observable produces the SVG element if possible, and throws
280280
* an error if no icon with the specified name can be found.

src/lib/icon/icon.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function sortedClassNames(element: Element): string[] {
1414
}
1515

1616
/**
17-
* Verifies that an element contains a single <svg> child element, and returns that child.
17+
* Verifies that an element contains a single `<svg>` child element, and returns that child.
1818
*/
1919
function verifyAndGetSingleSvgChild(element: SVGElement): SVGElement {
2020
expect(element.id).toBeFalsy();
@@ -25,7 +25,7 @@ function verifyAndGetSingleSvgChild(element: SVGElement): SVGElement {
2525
}
2626

2727
/**
28-
* Verifies that an element contains a single <path> child element whose "id" attribute has
28+
* Verifies that an element contains a single `<path>` child element whose "id" attribute has
2929
* the specified value.
3030
*/
3131
function verifyPathChildElement(element: Element, attributeValue: string): void {

src/lib/icon/icon.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@ export const _MatIconMixinBase = mixinColor(MatIconBase);
3838
* MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format
3939
* "[namespace]:[name]", if not the value will be the name of an icon in the default namespace.
4040
* Examples:
41-
* <mat-icon svgIcon="left-arrow"></mat-icon>
42-
* <mat-icon svgIcon="animals:cat"></mat-icon>
41+
* `<mat-icon svgIcon="left-arrow"></mat-icon>
42+
* <mat-icon svgIcon="animals:cat"></mat-icon>`
4343
*
4444
* - Use a font ligature as an icon by putting the ligature text in the content of the <mat-icon>
4545
* component. By default the Material icons font is used as described at
4646
* http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an
4747
* alternate font by setting the fontSet input to either the CSS class to apply to use the
4848
* desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.
4949
* Examples:
50-
* <mat-icon>home</mat-icon>
51-
* <mat-icon fontSet="myfont">sun</mat-icon>
50+
* `<mat-icon>home</mat-icon>
51+
* <mat-icon fontSet="myfont">sun</mat-icon>`
5252
*
5353
* - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the
5454
* font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a
5555
* CSS class which causes the glyph to be displayed via a :before selector, as in
5656
* https://fortawesome.github.io/Font-Awesome/examples/
5757
* Example:
58-
* <mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>
58+
* `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
5959
*/
6060
@Component({
6161
moduleId: module.id,
@@ -117,10 +117,10 @@ export class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, Can
117117
* the icon name. If the argument is falsy, returns an array of two empty strings.
118118
* Throws an error if the name contains two or more ':' separators.
119119
* Examples:
120-
* 'social:cake' -> ['social', 'cake']
120+
* `'social:cake' -> ['social', 'cake']
121121
* 'penguin' -> ['', 'penguin']
122122
* null -> ['', '']
123-
* 'a:b:c' -> (throws Error)
123+
* 'a:b:c' -> (throws Error)`
124124
*/
125125
private _splitIconName(iconName: string): [string, string] {
126126
if (!iconName) {

src/lib/progress-bar/progress-bar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const _MatProgressBarMixinBase = mixinColor(MatProgressBarBase, 'primary'
2828

2929

3030
/**
31-
* <mat-progress-bar> component.
31+
* `<mat-progress-bar>` component.
3232
*/
3333
@Component({
3434
moduleId: module.id,

src/lib/progress-spinner/progress-spinner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const INDETERMINATE_ANIMATION_TEMPLATE = `
6969
`;
7070

7171
/**
72-
* <mat-progress-spinner> component.
72+
* `<mat-progress-spinner>` component.
7373
*/
7474
@Component({
7575
moduleId: module.id,
@@ -236,10 +236,10 @@ export class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements
236236

237237

238238
/**
239-
* <mat-spinner> component.
239+
* `<mat-spinner>` component.
240240
*
241241
* This is a component definition to be used as a convenience reference to create an
242-
* indeterminate <mat-progress-spinner> instance.
242+
* indeterminate `<mat-progress-spinner>` instance.
243243
*/
244244
@Component({
245245
moduleId: module.id,

src/lib/select/select.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
260260
/** Manages keyboard events for options in the panel. */
261261
_keyManager: ActiveDescendantKeyManager<MatOption>;
262262

263-
/** View -> model callback called when value changes */
263+
/** `View -> model callback called when value changes` */
264264
_onChange: (value: any) => void = () => {};
265265

266-
/** View -> model callback called when select has been touched */
266+
/** `View -> model callback called when select has been touched` */
267267
_onTouched = () => {};
268268

269269
/** The IDs of child options to be passed to the aria-owns attribute. */

src/lib/sidenav/drawer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,9 @@ export class MatDrawer implements AfterContentInit, AfterContentChecked, OnDestr
415415

416416

417417
/**
418-
* <mat-drawer-container> component.
418+
* `<mat-drawer-container>` component.
419419
*
420-
* This is the parent component to one or two <mat-drawer>s that validates the state internally
420+
* This is the parent component to one or two `<mat-drawer>`s that validates the state internally
421421
* and coordinates the backdrop and content styling.
422422
*/
423423
@Component({

src/lib/stepper/stepper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {matStepperAnimations} from './stepper-animations';
4343
changeDetection: ChangeDetectionStrategy.OnPush,
4444
})
4545
export class MatStep extends CdkStep implements ErrorStateMatcher {
46-
/** Content for step label given by <ng-template matStepLabel>. */
46+
/** Content for step label given by `<ng-template matStepLabel>`. */
4747
@ContentChild(MatStepLabel) stepLabel: MatStepLabel;
4848

4949
constructor(@Inject(forwardRef(() => MatStepper)) stepper: MatStepper,

src/lib/tabs/tab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export const _MatTabMixinBase = mixinDisabled(MatTabBase);
4242
exportAs: 'matTab',
4343
})
4444
export class MatTab extends _MatTabMixinBase implements OnInit, CanDisable, OnChanges, OnDestroy {
45-
/** Content for the tab label given by <ng-template mat-tab-label>. */
45+
/** Content for the tab label given by `<ng-template mat-tab-label>`. */
4646
@ContentChild(MatTabLabel) templateLabel: MatTabLabel;
4747

48-
/** Template inside the MatTab view that contains an <ng-content>. */
48+
/** Template inside the MatTab view that contains an `<ng-content>`. */
4949
@ViewChild(TemplateRef) _content: TemplateRef<any>;
5050

5151
/** The plain text label for the tab, used when there is no template label. */

src/lib/tooltip/tooltip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export class MatTooltip implements OnDestroy {
364364

365365
/**
366366
* Returns the origin position and a fallback position based on the user's position preference.
367-
* The fallback position is the inverse of the origin (e.g. 'below' -> 'above').
367+
* The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
368368
*/
369369
_getOrigin(): {main: OriginConnectionPosition, fallback: OriginConnectionPosition} {
370370
const isDirectionLtr = !this._dir || this._dir.value == 'ltr';

0 commit comments

Comments
 (0)