File tree Expand file tree Collapse file tree
apps/api-documenter/src/yaml Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { DocItemSet } from '../utils/DocItemSet';
1010import { IYamlTocItem } from './IYamlTocFile' ;
1111import { IYamlItem } from './IYamlApiFile' ;
1212import { YamlDocumenter } from './YamlDocumenter' ;
13+ import { Text } from '@microsoft/node-core-library' ;
1314
1415interface ISnippetsFile {
1516 /**
@@ -128,18 +129,10 @@ export class OfficeYamlDocumenter extends YamlDocumenter {
128129 }
129130
130131 private _fixBoldAndItalics ( text : string ) : string {
131- while ( text . indexOf ( '\\*' ) >= 0 ) {
132- text = text . replace ( '\\*' , '*' ) ;
133- }
134-
135- return text ;
132+ return Text . replaceAll ( text , '\\*' , '*' ) ;
136133 }
137134
138135 private _fixCodeTicks ( text : string ) : string {
139- while ( text . indexOf ( '\\`' ) >= 0 ) {
140- text = text . replace ( '\\`' , '`' ) ;
141- }
142-
143- return text ;
136+ return Text . replaceAll ( text , '\\`' , '`' ) ;
144137 }
145138}
You can’t perform that action at this time.
0 commit comments