mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Problems with unmatched parentheses #147

Closed jolyonb closed 6 years ago

jolyonb commented 6 years ago

The javascript parser doesn't treat unmatched parentheses correctly when doing its wrapping. In particular, if you put in sin(, the output is {:s:}in(.

ChristopherChudzicki commented 6 years ago

So, the issue is that {:s:}in( displays as sāˆˆ(?

I think the behavior we want with unmatched parentheses is to wrap the function name only. So:

  1. sin(1/2 ā€”> {:sin:}(1/2
  2. sin(1/2) ā€”> {:sin(1/2):}

does that sound right?

jolyonb commented 6 years ago

Yeah, I agree. That sounds good to me.