Skip to content

Commit

Permalink
feat: add hledger (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
leana8959 authored Aug 16, 2024
1 parent 079e4c2 commit b59cbbf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ Haskell
Haxe
Hcl
Hex
hledger
Hlsl
HolyC
Html
Expand Down
7 changes: 7 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,13 @@
"nested": true,
"extensions": ["lean", "hlean"]
},
"Hledger": {
"name": "hledger",
"line_comment": [";", "#"],
"multi_line_comments": [["comment", "end comment"]],
"nested": false,
"extensions": ["hledger"]
},
"Less": {
"name": "LESS",
"line_comment": ["//"],
Expand Down
18 changes: 18 additions & 0 deletions tests/data/hledger.hledger
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 18 lines 6 code 10 comments 2 blanks
# a comment
; another comment

; ^ a blank line
comment
account assets ; Declare valid account names and display order.
a block comment
end comment

account assets:savings ; A subaccount. This one represents a bank account.
account assets:checking ; Another. Note, 2+ spaces after the account name.
account assets:receivable ; Accounting type is inferred from english names,
account passifs ; or declared with a "type" tag, type:L
account expenses ; type:X
; A follow-on comment line, indented.
account expenses:rent ; Expense and revenue categories are also accounts.
; Subaccounts inherit their parent's type.

0 comments on commit b59cbbf

Please sign in to comment.