fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartntml',
|
||||
version: '1.0.8',
|
||||
version: '1.0.9',
|
||||
description: 'lit-html for the backend'
|
||||
}
|
||||
|
@ -36,9 +36,13 @@ export class Smartntml {
|
||||
this.html = lit.html;
|
||||
}
|
||||
|
||||
public async renderTemplateResult(templateResult: litTypes.TemplateResult) {
|
||||
public async renderTemplateResult(templateResult: litTypes.TemplateResult, stripCommentsArg = true) {
|
||||
const element = document.createElement('div');
|
||||
this.render(templateResult, element);
|
||||
return element.innerHTML;
|
||||
let stringResult = element.innerHTML;
|
||||
if (stripCommentsArg) {
|
||||
stringResult = stringResult.replace(/<!--(.*?)-->/g, '');
|
||||
}
|
||||
return stringResult;
|
||||
}
|
||||
}
|
||||
|
@ -8,3 +8,5 @@ import * as smartpromise from '@pushrocks/smartpromise';
|
||||
export {
|
||||
smartpromise
|
||||
}
|
||||
|
||||
// third party scope
|
||||
|
Reference in New Issue
Block a user