diff options
author | jakobst1n <jakob.stendahl@outlook.com> | 2023-12-26 23:29:47 +0100 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2023-12-26 23:29:47 +0100 |
commit | 0415818aa793565631595046db2df9cf7e59d3f4 (patch) | |
tree | e67b6b3fbac60fc431fee15761da5de9e6a111d8 | |
parent | f5489bc1b3732f92d475623af24c9eb55381ae1f (diff) | |
download | journal-lib-master.tar.gz journal-lib-master.zip |
-rw-r--r-- | src/journal_lib/parse/lexers/l_ledger.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/journal_lib/parse/lexers/l_ledger.py b/src/journal_lib/parse/lexers/l_ledger.py index ec245f0..6bcd24e 100644 --- a/src/journal_lib/parse/lexers/l_ledger.py +++ b/src/journal_lib/parse/lexers/l_ledger.py @@ -181,6 +181,8 @@ class JournalLexer(LexWrapper): # Check if the comment is at the start of a line (considering whitespaces) line_start = t.lexer.lexdata.rfind("\n", 0, t.lexpos) + 1 pre_comment = t.lexer.lexdata[line_start : t.lexpos] + # Remove the leading characters + t.value = t.value.lstrip(" ;") # If the comment is at the start of a line, it's a standalone comment if pre_comment.isspace() or pre_comment == "": |