home
·
contact
·
privacy
projects
/
ledgplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0340e50
)
Minor formatting fixes.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 27 Apr 2025 17:14:31 +0000
(19:14 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 27 Apr 2025 17:14:31 +0000
(19:14 +0200)
src/ledgplom/ledger.py
patch
|
blob
|
history
diff --git
a/src/ledgplom/ledger.py
b/src/ledgplom/ledger.py
index 0b94d2f139268f51cb2279d3caabc17141b58c8b..1587fd7fa8af9a321cca2ca2e24b5b951f474001 100644
(file)
--- a/
src/ledgplom/ledger.py
+++ b/
src/ledgplom/ledger.py
@@
-132,7
+132,9
@@
class _DatLine:
@property
def raw(self) -> str:
"""Return as how to be written in .dat file's text content."""
- return self.code + ' ; '.join([''] + [s for s in [self.comment] if s])
+ comment_part = ' ; '.join([''] + [s for s in [self.comment] if s])
+ code_part = f'{self.code} ' if self.code else ''
+ return f'{code_part}{comment_part.lstrip()}'
def copy(self) -> Self:
"""Create new instance copying the fields named in .to_copy."""