refactor(aio): switch to pipeable RxJS operators (#22872)
PR Close #22872
This commit is contained in:

committed by
Matias Niemelä

parent
da76db9601
commit
01d2dd2a3a
@ -3,7 +3,7 @@ import { Logger } from 'app/shared/logger.service';
|
||||
import { PrettyPrinter } from './pretty-printer.service';
|
||||
import { CopierService } from 'app/shared/copier.service';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import 'rxjs/add/operator/do';
|
||||
import { tap } from 'rxjs/operators';
|
||||
|
||||
/**
|
||||
* If linenums is not set, this is the default maximum number of lines that
|
||||
@ -120,7 +120,7 @@ export class CodeComponent implements OnChanges {
|
||||
|
||||
this.pretty
|
||||
.formatCode(leftAlignedCode, this.language, this.getLinenums(leftAlignedCode))
|
||||
.do(() => this.codeFormatted.emit())
|
||||
.pipe(tap(() => this.codeFormatted.emit()))
|
||||
.subscribe(c => this.setCodeHtml(c), err => { /* ignore failure to format */ }
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user