fis-velocity-label-parser
fis velocity 标签分析
介绍:分析velocity中的标签,返回标签对应的数组。
背景
velocity中很多标签均对应#end结尾,正则无法匹配出对应标签,使用fis-velocity-label-parser即可返回对应标签。方便其他编译使用。
a.vm
#html("home:static/lib/mod.js") #head #if($info.imgs) #else #end #end #body #require("home:static/index/index.css") #widget("home:widget/A/A.tpl") ## 注释1 #* 注释2 *# #** 注释3 *# #script require.async("home:static/ui/B/B.js"); #end #foreach( $info in $hotList1) $!info.title #end #end #end
解析后结果为:
[