@compodoc/compodoc
Version:
The missing documentation tool for your Angular application
13 lines (11 loc) • 495 B
text/typescript
import { IHtmlEngineHelper } from './html-engine-helper.interface';
import * as Handlebars from 'handlebars';
export class ObjectHelper implements IHtmlEngineHelper {
public helperFunc(context: any, text: string) {
text = JSON.stringify(text);
text = text.replace(/{"/, '{<br> "');
text = text.replace(/,"/, ',<br> "');
text = text.replace(/}$/, '<br>}');
return new Handlebars.SafeString(text);
}
}