Commit 4fdca23f authored by liujiaxin's avatar liujiaxin

jm 12

parent 0fe11979
import {Pipe, PipeTransform} from '@angular/core';
// import {ElectronUtil} from '../util/ElectronUtil';
declare const APP_PATH;
// const isInElectron = localStorage.getItem('electron');
@Pipe({
name: 'contents'
})
export class ContentsPipe implements PipeTransform {
transform(contents?: string, brNumber = 1): string {
if (!contents) {
return '';
}
return contents.replace(/\n+/gm,'<br/>'.repeat(brNumber));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment