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 | 6421f57469e6f2417b3789eaee1a9502dd312045 (patch) | |
tree | 517bde81263615b5c7bf5174c01bb64f1bb6f24c | |
parent | 7f0a1ac5a3237dd26daffc058fb827cedff61174 (diff) | |
download | fork-ledger-6421f57469e6f2417b3789eaee1a9502dd312045.tar.gz fork-ledger-6421f57469e6f2417b3789eaee1a9502dd312045.tar.bz2 fork-ledger-6421f57469e6f2417b3789eaee1a9502dd312045.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); |