File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -308,8 +308,6 @@ an alist (ACCOUNT-ELEMENT . NODE)."
308308 (eq 'comment (car (cdr (ledger-context-at-point))))
309309 (save-excursion
310310 (back-to-indentation )
311- (search-forward " ;" )
312- (skip-chars-forward " \t " )
313311 (setq start (point )))
314312 (setq collection (cons 'nullary #'ledger-comments-list )))
315313 (; ; Payees
@@ -365,10 +363,12 @@ an alist (ACCOUNT-ELEMENT . NODE)."
365363 (let ((comments '()))
366364 (save-excursion
367365 (goto-char (point-min ))
368- ; ; FIXME: This only catches comments at beginning of lines and
369- ; ; starting with some spaces (so "transaction comments"). There
370- ; ; can also be comments after payees or prices too
371- (while (re-search-forward " ^[ \t ]+;[ \t ]*\\ (?1:.+\\ )$" nil t )
366+ ; ; FIXME: This only catches comments at beginning of lines and starting
367+ ; ; with some spaces (so "transaction comments"). There can also be
368+ ; ; comments after payees or prices too, as well as comments outside of
369+ ; ; transactions (the latter should be completed over separately).
370+ ; ; TODO: Unify this regex with `ledger-comment-regex'
371+ (while (re-search-forward " ^[ \t ]+\\ (?1:;.+\\ )$" nil t )
372372 (push (match-string-no-properties 1 ) comments)))
373373 (sort (delete-dups comments) #'string-lessp )))
374374
You can’t perform that action at this time.
0 commit comments