mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 05:50:43 -07:00
fix: address refactor comments
This commit is contained in:
committed by
Jun Yang
parent
b8e4b3337b
commit
6a0ad102a8
@@ -1,3 +1,5 @@
|
||||
import { stringify, toValue } from '../util/underscore'
|
||||
|
||||
export class Emitter {
|
||||
public html: any = '';
|
||||
public break = false;
|
||||
@@ -9,6 +11,11 @@ export class Emitter {
|
||||
}
|
||||
|
||||
public write (html: any) {
|
||||
if (this.keepOutputType === true) {
|
||||
html = toValue(html)
|
||||
} else {
|
||||
html = stringify(toValue(html))
|
||||
}
|
||||
// This will only preserve the type if the value is isolated.
|
||||
// I.E:
|
||||
// {{ my-port }} -> 42
|
||||
|
||||
Reference in New Issue
Block a user