Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add hledger support #1121

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,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 @@ -846,6 +846,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.
Loading