Skip to content
This repository

Fix regex for "Extract Let" #34

Merged
merged 1 commit into from over 2 years ago

2 participants

Kenichi TAKAHASHI Enrique Comba Riepenhausen
Kenichi TAKAHASHI

fix some regex bug.

  • 'describe' with white space is beggining
  • 'context' is end of line
Enrique Comba Riepenhausen ecomba merged commit a01c467 into from December 09, 2011
Enrique Comba Riepenhausen ecomba closed this December 09, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 04, 2011
Kenichi TAKAHASHI fix regex 38b93f5
This page is out of date. Refresh to see the latest.
2  plugin/refactorings/general/rspec_extractlet.vim
@@ -8,7 +8,7 @@ function! ExtractIntoRspecLet()
8 8
     return
9 9
   end
10 10
   normal! dd
11  
-  exec "?^\\<describe\\|context\\>"
  11
+  exec "?^\\s*\\<\\(describe\\|context\\)\\>"
12 12
   normal! $p
13 13
   exec 's/\v([a-z_][a-zA-Z0-9_]*) \= (.+)/let(:\1) { \2 }'
14 14
   normal V=
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.