Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加config接口 #3

Closed
otakustay opened this issue Oct 28, 2013 · 2 comments
Closed

增加config接口 #3

otakustay opened this issue Oct 28, 2013 · 2 comments

Comments

@otakustay
Copy link
Member

现在用处不大,但总会用上的,这样:

var engine = new template.Engine();
engine.config('encodeHTML', false);

表示默认不要进行HTML转义。

当然也有template.config('encodeHTML', false);的写法。

另外还要全局配置(区别于template.config,那个只给默认引擎生效),因此要有

template.global('encodeHTML', false);
@errorrik
Copy link
Contributor

暂不支持全局配置先

@errorrik
Copy link
Contributor

config接口已实现,就关了哈

未实现global config先,怕人new Engine了后,用着用着被耍了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants