numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
199 stars 118 forks source link

Numbas.util.splitbrackets doesn't deal with curly braces inside strings #928

Closed christianp closed 2 years ago

christianp commented 2 years ago

e.g. Numbas.util.splitbrackets('{a("{b}")}','{','}','(',')') should return ['', 'a("{b}")'], but instead at the moment it returns ['', 'a("(b)")'] - the nested curly brackets are replaced with parentheses.