Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
zw963 opened this Issue · 3 comments

2 participants

@zw963

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 ???

@capitaomorte

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

@zw963

OK. thanks..

the two workaround is so subtle...

@capitaomorte capitaomorte reopened this
@capitaomorte

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

@capitaomorte capitaomorte closed this issue from a commit
@capitaomorte Closes #290: problem when advancing the start of a mirror-in-field
* Rewrote 'yas--update-mirrors'
* Added unit test
* Advancing is done exceptionally in 'yas--update-mirrors'
  not 'yas--mirror-update-display' and just before we need to
  re-update the mirror-in-field.
* Alternative to prior point would be to have fields carry a reference
  to their child mirrors.
9503c33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.