diff options
author | John Wiegley <johnw@newartisans.com> | 2005-11-09 01:23:03 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:20 -0400 |
commit | b2bb3b45109eeb4ee1b550e08d0477464b28ecc1 (patch) | |
tree | 517bde81263615b5c7bf5174c01bb64f1bb6f24c | |
parent | c7d72a09af1ff0905cc421fa2d703c1f5d622081 (diff) | |
download | fork-ledger-b2bb3b45109eeb4ee1b550e08d0477464b28ecc1.tar.gz fork-ledger-b2bb3b45109eeb4ee1b550e08d0477464b28ecc1.tar.bz2 fork-ledger-b2bb3b45109eeb4ee1b550e08d0477464b28ecc1.zip |
(parse_amount): Ignore inline math characters that are found quotes.
-rw-r--r-- | textual.cc | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -134,12 +134,17 @@ void parse_amount(const char * text, amount_t& amt, unsigned short flags, { char * altbuf = NULL; - if (*text) + if (*text) { + bool in_quote = false; for (const char * p = text + 1; *p; p++) - if (is_mathchr(*p)) { + if (*p == '"') { + in_quote = ! in_quote; + } + else if (! in_quote && is_mathchr(*p)) { text = altbuf = parse_inline_math(text); break; } + } if (*text != '(') { amt.parse(text, flags); |