We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var etpl = require('etpl') etpl.addFilter('trim', function (s, space) { return s.substring(space) }) var render = etpl.compile('${id | trim(${space})}') var data = { id: 'abc', space: 1 } render(data) // -> "${id | trim(1)}"
已经修复了 #8 的错误保证能顺利执行
预期输出应该是abc在截取掉1位(space控制)后的字符串,即"bc",但真实输出是"${id | trim(1)}",逻辑不大能分析出来……似乎trim本身也没有执行
abc
space
"bc"
"${id | trim(1)}"
trim
The text was updated successfully, but these errors were encountered:
57fcd5d
erik168
No branches or pull requests
已经修复了 #8 的错误保证能顺利执行
预期输出应该是
abc
在截取掉1位(space
控制)后的字符串,即"bc"
,但真实输出是"${id | trim(1)}"
,逻辑不大能分析出来……似乎trim
本身也没有执行The text was updated successfully, but these errors were encountered: