]> git.ktnx.net Git - mobile-ledger.git/commitdiff
trim comments coming from hledger-web
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 Jan 2020 21:23:44 +0000 (23:23 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 5 Jan 2020 21:23:44 +0000 (23:23 +0200)
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedPosting.java
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedPosting.java

index a3667a23b26b4b17dced960c11ba2a6e2bc8a34b..a92900da157b3cb7014866218bb63a922d8451a8 100644 (file)
@@ -94,7 +94,7 @@ public class ParsedPosting {
         return pcomment;
     }
     public void setPcomment(String pcomment) {
-        this.pcomment = pcomment;
+        this.pcomment = (pcomment == null) ? null : pcomment.trim();
     }
     public List<List<String>> getPtags() {
         return ptags;
index a0607512fa3aec4bf71f178f7d8448e7d869a545..fd10b9c574d92d6166404bbbe5cad49624155c20 100644 (file)
@@ -94,7 +94,7 @@ public class ParsedPosting {
         return pcomment;
     }
     public void setPcomment(String pcomment) {
-        this.pcomment = pcomment;
+        this.pcomment = (pcomment == null) ? null : pcomment.trim();
     }
     public List<List<String>> getPtags() {
         return ptags;