diff options
author | Peter Odding <peter@peterodding.com> | 2011-06-14 16:49:14 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2011-06-14 16:49:14 +0200 |
commit | bc108a798eef89cbfe3c0daaa1729f77a0c18b3e (patch) | |
tree | b922d35eccc5cc03947c159e46609fa76c4501fd | |
parent | 754ebd0b083b9fa185f886d42d9f796761d28311 (diff) | |
download | vim-easytags-bc108a798eef89cbfe3c0daaa1729f77a0c18b3e.tar.gz |
Bug fix: Trim leading/trailing empty lines
-rw-r--r-- | str.vim | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,12 +1,12 @@ " Vim auto-load script " Author: Peter Odding <peter@peterodding.com> -" Last Change: March 15, 2011 +" Last Change: June 14, 2011 " URL: http://peterodding.com/code/vim/misc/ " Trim whitespace from start and end of string. function! xolox#misc#str#trim(s) - return substitute(a:s, '^\s*\(.\{-}\)\s*$', '\1', '') + return substitute(a:s, '^\_s*\(.\{-}\)\_s*$', '\1', '') endfunction " vim: ts=2 sw=2 et |