From b68207234f1139135e70d32740a078ff4d423bc0 Mon Sep 17 00:00:00 2001 From: Nathan Grigg Date: Mon, 30 Nov 2015 19:35:56 -0800 Subject: Fix indent to work for posts with no narration Fixes github #9. --- indent/beancount.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-2-gb3c3