1 | import { IHtmlEngineHelper } from './html-engine-helper.interface';
|
2 | import * as Handlebars from 'handlebars';
|
3 |
|
4 | export class BreakCommaHelper implements IHtmlEngineHelper {
|
5 | constructor(private bars) {}
|
6 |
|
7 | public helperFunc(context: any, text: string) {
|
8 | text = this.bars.Utils.escapeExpression(text);
|
9 | text = text.replace(/,/g, ',<br>');
|
10 | return new Handlebars.SafeString(text);
|
11 | }
|
12 | }
|