branch: elpa/evil-matchit commit 665751dff8621fa479a5d57b1cb395108046aaaf Author: Sergio Gil Pérez de la Manga <sgilpe...@gmail.com> Commit: GitHub <nore...@github.com>
Ignore trailing space in Ruby blocks with arguments If the line where a block with arguments has trailing space, the regular expression doesn't match, the `do` gets skipped and the matches are all wrong. This change fixes it, I think it makes sense, since the regular expression for the block without arguments does the same. --- evil-matchit-ruby.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evil-matchit-ruby.el b/evil-matchit-ruby.el index 45a0bf21a2..97872ef37c 100644 --- a/evil-matchit-ruby.el +++ b/evil-matchit-ruby.el @@ -34,7 +34,7 @@ (defvar evilmi-ruby-extract-keyword-howtos '(("^[ \t]*[^ \t=]+[ \t]*=[ \t]*\\([a-z]+\\)\\( .*\\| *\\)$" 1) ("^[ \t]*\\([a-z]+\\)\\( .*\\| *\\)$" 1) - ("^.* \\(do\\) |[a-z0-9A-Z_, *]+|$" 1) + ("^.* \\(do\\) |[a-z0-9A-Z_, *]+| *$" 1) ("^.* \\(do\\) *$" 1) ("^.* \\(end\\)\\..*$" 1)))