diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-09-30 21:39:57 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-10-25 10:27:39 +0800 |
| commit | bf6e5daa086d4dbde812e95b00dd951f09f7d398 (patch) | |
| tree | 96c10a686a97c24840d953fc061d17ece57b3e96 /rc/base/ruby.kak | |
| parent | 78530b82bea5788e74d425b8d206090e8a497ef8 (diff) | |
Use stricter regex syntax
boost regex tolerates non-escaped special characters, and escaped
non-special characters. Standardize on stricter syntax, where
special characters must be escaped, and non-special characters must
not.
Diffstat (limited to 'rc/base/ruby.kak')
| -rw-r--r-- | rc/base/ruby.kak | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 494385a2..0b1f9ff0 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -132,7 +132,7 @@ def -hidden ruby-indent-on-new-line %{ def -hidden ruby-insert-on-new-line %{ eval -no-hooks -draft -itersel %{ # copy _#_ comment prefix and following white spaces - try %{ exec -draft k <a-x> s ^ \h * \K \# \h * <ret> y gh j P } + try %{ exec -draft k <a-x> s '^\h*\K#\h*' <ret> y gh j P } # wisely add end structure eval -save-regs x %{ try %{ exec -draft k <a-x> s ^ \h + <ret> \" x y } catch %{ reg x '' } |
