I have a snippet like
/ name:[\.a-zA-Z]+ flag:flag? params:mparams? {
name = name.join('')
if Formatter['=#{name}']
params = (params or []).join(',')
return "this['=#{name}'](#{params})"
else
caseName = name.charAt(0).toLowerCase() + name.slice(1)
return "this.stripHTML(this.item['#{name}'] || this.item['#{caseName}'] || '')"
}
This generates javascript code that re-declares "name" and thereby blanks out the value passed in from the match (it used to work before porting it to coffeescript)
I have a snippet like
This generates javascript code that re-declares "name" and thereby blanks out the value passed in from the match (it used to work before porting it to coffeescript)