Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

use `and' condtion in ${2:$1...}, it expand is not correct #290

Closed
zw963 opened this Issue Aug 21, 2012 · 3 comments

Comments

Projects
None yet
2 participants

zw963 commented Aug 21, 2012

e.g.

<%= f.submit "${1:Submit}"${2:, :disable_with => '${3:$1ing...}'} %>

It expand to: (the normal situation, work OK)

<%= f.submit "Submit", :disable_with => 'Submiting...' %>

but if I want auto delete , :disable_with => ' before {2:$1ing...} and ' after ${2:$1ing}...

<%= f.submit "${1:Submit}"${2:$(and (yas-text) ", :disable_with => '")}${2:$1ing...}${2:$(and (yas-text) "'")} %>

it expand to: (work NOT OK)

<%= f.submit "Submit", :disable_with => 'ing...' %>

${2:$1...} not expand correct, Why $1 is not expand ???

Owner

joaotavora commented Aug 21, 2012

This is a bug. For reference

<%= f.submit "${1:Submit}"${2:$(and (yas-text) ", :disable_with => '")}${2:Doing the $1ing...}${2:$(and (yas-text) "'")} %>

and

<%= f.submit "${1:Submit}"${2:$(and (yas-text) ", :disable_with => '")} ${2:$1ing...}${2:$(and (yas-text) "'")} %>

both work correctly

@joaotavora joaotavora closed this Aug 21, 2012

zw963 commented Aug 21, 2012

OK. thanks..

the two workaround is so subtle...

@joaotavora joaotavora reopened this Aug 21, 2012

Owner

joaotavora commented Aug 21, 2012

Reopened, this is not fixed at all. Closed in error. sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment