diff options
author | Nathan Grigg | 2015-11-30 19:35:56 -0800 |
---|---|---|
committer | Nathan Grigg | 2015-11-30 19:35:56 -0800 |
commit | b68207234f1139135e70d32740a078ff4d423bc0 (patch) | |
tree | e2d34ded6df95d3e90870ce91b2aa82388580931 | |
parent | 12ef2ee68caf2151df9d3d22bfa39dacf44e0fb1 (diff) | |
download | vim-beancount-b68207234f1139135e70d32740a078ff4d423bc0.tar.gz |
Fix indent to work for posts with no narration
Fixes github #9.
Diffstat (limited to '')
-rw-r--r-- | indent/beancount.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indent/beancount.vim b/indent/beancount.vim index 29d7d9e..cfc8aa6 100644 --- a/indent/beancount.vim +++ b/indent/beancount.vim @@ -22,7 +22,8 @@ function! s:IsMetadata(str) endfunction function! s:IsTransaction(str) - return a:str =~ '\v^\s*\d{4}-\d{2}-\d{2}\s+(txn\s+)?\S\s' + " The final \S represents the flag (e.g. * or !). + return a:str =~ '\v^\s*\d{4}-\d{2}-\d{2}\s+(txn\s+)?\S(\s|$)' endfunction function GetBeancountIndent(line_num) |