Skip to content

Commit 9677109

Browse files
committed
Give explicit multiplication the special mq_precedence as well.
Implied multiplication ` *` currently has the precedence of 2.9 when MathQuill is used. This means that `(x-3)/4 (x+8)/7` is interpreted as `\frac{(x-3)}{4} * \frac{(x+8)}{7}`. However, `(x-3)/4 * (x+8)/7` is interpreted as `\frac{\frac{(x-3)/4 * (x+8)}{7}`. That should also be interpreted as `\frac{(x-3)}{4} * \frac{(x+8)}{7}` and is with the mq_precendence for `* ` also set to 2.9.
1 parent 352b286 commit 9677109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Parser/Context.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ sub usePrecedence {
216216
/^Standard/i and do {
217217
$self->operators->set(
218218
' *' => { precedence => 3, mq_precedence => 2.9 },
219-
'* ' => { precedence => 3 },
219+
'* ' => { precedence => 3, mq_precedence => 2.9 },
220220
' /' => { precedence => 3 },
221221
'/ ' => { precedence => 3 },
222222
fn => { precedence => 7.5 },

0 commit comments

Comments
 (0)