Silverstripe 模板,html 模式
尝试获得一种使用银叶模板的模式,但是<% end_control %>< /code> 会破坏缩进,但
,但我不知道如何修复它。<% nd_control %>
不会。它一定是“<% end”
Trying to get a mode to work with silverstipe templates, but <% end_control %>
breaks the indentation, but <% nd_control %>
does not. It must be the "<% end"
, but I'm stuck on how to fix it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜这将是绊倒它的部分 end_[a-zA-Z1-9_.]*
我不是 lisp 或正则表达式专家。但我怀疑 end_[:alpha:]+ 应该有效。查看 emacs 正则表达式文档 http://www.emacswiki.org/emacs/RegularExpression
你应该可以不用 _ 或 。如果您想在比赛中包含句号,我认为您需要双反斜杠 \。但我想不出 SS 在结束模板语句中使用它的例子。并且下划线应该已经与 end_ 匹配
I'm guessing this will be the part tripping it up end_[a-zA-Z1-9_.]*
I'm no lisp or regex expert. But I would suspect end_[:alpha:]+ should work. After taking a look at the emacs regex docs http://www.emacswiki.org/emacs/RegularExpression
You should be able to do without _ or . If you wanted to include the fullstop in the match I think you'll need double backslash \. But I can't think of an example when SS uses this in a closing template statement. And the underscore should already be matched with end_