From 2cba15a97d656a1ff6457576a631148f1ab54e7d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 16 Jun 2021 10:09:15 -1000 Subject: [PATCH] doc: journal: fix account types regexps table rendering (#1573) --- hledger/hledger.m4.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 5b74ba67e..999ca776e 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -2669,17 +2669,18 @@ If you happen to use common english top-level account names, you may not need to declare account types, as they will be detected automatically using the following rules: -| If name matches this [regular expression]: | account type is: -|----------------------------------------------|----------------- -| `^assets?(:|$)` | `Asset` -| `^(debts?|liabilit(y|ies))(:|$)` | `Liability` -| `^equity(:|$)` | `Equity` -| `^(income|revenue)s?(:|$)` | `Revenue` -| `^expenses?(:|$)` | `Expense` - -| If account type is `Asset` and name does not contain this regular expression: | account type is: -|-------------------------------------------------------------------------------|----------------- -| `(investment|receivable|:A/R|:fixed)` | `Cash` + +``` + If account's name matches this regular expression: | its type is: +------------------------------------------------------------------- | ------------ + ^assets?(:|$) | + and does not contain regexp (investment|receivable|:A/R|:fixed) | Cash + otherwise | Asset + ^(debts?|liabilit(y|ies))(:|$) | Liability + ^equity(:|$) | Equity + ^(income|revenue)s?(:|$) | Revenue + ^expenses?(:|$) | Expense +``` Even so, explicit declarations may be a good idea, for clarity and predictability.