aboutsummaryrefslogtreecommitdiffstats
path: root/indent
diff options
context:
space:
mode:
authorNathan Grigg2015-11-30 19:35:56 -0800
committerNathan Grigg2015-11-30 19:35:56 -0800
commitb68207234f1139135e70d32740a078ff4d423bc0 (patch)
treee2d34ded6df95d3e90870ce91b2aa82388580931 /indent
parent12ef2ee68caf2151df9d3d22bfa39dacf44e0fb1 (diff)
downloadvim-beancount-b68207234f1139135e70d32740a078ff4d423bc0.tar.gz
Fix indent to work for posts with no narration
Fixes github #9.
Diffstat (limited to '')
-rw-r--r--indent/beancount.vim3
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)