Skip to content

Commit

Permalink
syntax: support more single-line comment characters
Browse files Browse the repository at this point in the history
According to the manual, section 14.2.1 [1], the characters #, |, and *
are also supported as comment characters at the beginning of a line.

[1]: http://ledger-cli.org/3.0/doc/ledger3.html#Comments-and-meta_002ddata

Signed-off-by: Roland Hieber <rohieb@rohieb.name>
  • Loading branch information
rohieb committed Oct 25, 2017
1 parent dbbfbc1 commit 6d0820e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ syn match ledgerOneCharDirective /^\%(P\|A\|Y\|N\|D\|C\)\s/

syn region ledgerBlockComment start=/^comment/ end=/^end comment/
syn region ledgerBlockTest start=/^test/ end=/^end test/
syn match ledgerComment /^;.*$/
syn match ledgerComment /^[;|*#].*$/
" comments at eol must be preceded by at least 2 spaces / 1 tab
syn region ledgerMetadata start=/\%( \|\t\|^\s\+\);/ skip=/^\s\+;/ end=/^/
\ keepend contained contains=ledgerTags,ledgerValueTag,ledgerTypedTag
Expand Down

0 comments on commit 6d0820e

Please sign in to comment.