summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/textual.cc3
-rw-r--r--test/regress/C523E23F.test21
2 files changed, 24 insertions, 0 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 5a47b75a..f2996a03 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -863,6 +863,9 @@ post_t * instance_t::parse_post(char * line,
char * next = next_element(p, true);
char * e = p + std::strlen(p);
+ while (e > p && std::isspace(*(e - 1)))
+ e--;
+
if ((*p == '[' && *(e - 1) == ']') || (*p == '(' && *(e - 1) == ')')) {
post->add_flags(POST_VIRTUAL);
DEBUG("textual.parse", "line " << linenum << ": "
diff --git a/test/regress/C523E23F.test b/test/regress/C523E23F.test
new file mode 100644
index 00000000..b8b08e00
--- /dev/null
+++ b/test/regress/C523E23F.test
@@ -0,0 +1,21 @@
+bal
+<<<
+D 1.000,00€
+
+2009/03/16 * denn's
+ ; Kauf: Yogi-Tee
+ Aufwand:Einkauf:Lebensmittel 17,94€
+ Aktiva:Bank:Girokonto
+
+2009/03/24 Ansparen
+ Aktiva:Bank:Sparkonto 800,00€
+ Aktiva:Bank:Girokonto
+>>>1
+ -17,94€ Aktiva:Bank
+ -817,94€ Girokonto
+ 800,00€ Sparkonto
+ 17,94€ Aufwand:Einkauf:Lebensmittel
+--------------------
+ 0
+>>>2
+=== 0