Khan/khan-exercises — Issue #11684: expr and color don't play well together
Author: danielmclaury
Created: 2012-01-20 06:59:05+00:00
State: open

First problem:

expr( [ "*", 3, 4 ] ) returns "(3)(4)" which displays as (3)(4) -- good!

expr( [ "*", [ "color", "red", 3 ], [ "color", "blue", 3 ] ] ) returns "\\color{red}{3}\\color{blue}{3}" which displays as 34 -- bad!

Second problem:

expr( [ "+", 3, 2 ]) returns "3 + -2" which then displays as 3-2 -- good!

expr( [ "+", [ "color", "red", 3 ], [ "color", "blue", -3 ] ] ) returns "\\color{red}{3}+\\color{blue}{-3}" which then displays as 3+-2 -- bad!