From f9c31f3f420255e9afbcaa2c4a5f07758c5adecb Mon Sep 17 00:00:00 2001 From: kimth Date: Sun, 9 Sep 2012 13:16:22 -0400 Subject: [PATCH] Add comments --- common/lib/xmodule/xmodule/js/src/capa/display.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee index e57a0e78bc..9fad72579d 100644 --- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee @@ -310,6 +310,9 @@ class @Problem 'R3' --> 'R_{3}' 'vGS' --> 'v_{GS}' 'K/2*(vIN-VT)^2' --> 'K/2*(v_{IN}-V_{T})^2' + + ... and also escape specific 6.002x-related keywords from MathJax, + such as 'in' (parsed by MathJax as the set symbol) ### # Default keywords are taken from capa/calc.py @@ -318,7 +321,7 @@ class @Problem # Escape keywords are strings that have special meaning in 6.002x that should not be processed by Jax escape_keywords = ['in'] - # First, perform subscript insertion + # First, perform subscript insertion, but watch out for keywords replace_subscript = (match) -> if match in default_keywords or match in escape_keywords return match