(parse_amount): Ignore inline math characters that are found quotes.
This commit is contained in:
parent
c7d72a09af
commit
b2bb3b4510
1 changed files with 7 additions and 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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue