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

Allow optional space after : in map passed as parameter to macro #38

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

jamescookie
Copy link
Contributor

Currently if a map is passed to a macro then you cannot have a space after the ':' e.g.
{"foo":"bar"}
With this patch, you can have:
{"foo": "bar"}

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8dd19a2 on jamescookie:master into 6b8e9a9 on shepherdwind:master.

@shepherdwind
Copy link
Owner

Yeah, thanks your commit. I will publish an new bugfix version soon.

shepherdwind added a commit that referenced this pull request Jan 7, 2015
Allow optional space after : in map passed as parameter to macro
@shepherdwind shepherdwind merged commit 883f9ac into shepherdwind:master Jan 7, 2015
var vm = '#macro( d $a)#foreach($_item in $a.entrySet())$_item.key = $_item.value #end#end #d ( {"foo": $foo,"bar":$bar} )'
assert.equal(' foo = a bar = b ', render(vm, {foo: 'a', bar: 'b'}))
})

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This spec file just run on browser. But for velocity.js, there is no anything about dom, so nodejs is just the same as browser.

So, this file is no necessary.

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

Successfully merging this pull request may close these issues.

None yet

3 participants