summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/textual.cc b/textual.cc
index f144bcb3..9b1322b9 100644
--- a/textual.cc
+++ b/textual.cc
@@ -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);