c-w / mathquill4quill

Power-up Quill's formula editing via the MathQuill editor
https://justamouse.com/mathquill4quill
Apache License 2.0
139 stars 33 forks source link

Improve command operator regex #74

Closed ahmed2m closed 3 years ago

ahmed2m commented 3 years ago

I just realized that the original regex only allowed things like \\sqrt[3]{} but not \\int_x^y, so I just simplified the regex to detect \ followed by just letters

ahmed2m commented 3 years ago

Thanks for the fix. Could you also add a few tests so that we don't get a regression here in the future? Thanks in advance!

Added two tests, had to add a dataset attribute to the operator buttons to be able to test them. The test is rather simple because if a latex string like \sqrt[3]{} or \int_x^y was sent to the .cmd() it won't be rendered properly in the text field, same for \sqrt if sent to .write()

ahmed2m commented 3 years ago

Any chance for this to be released soon?

c-w commented 3 years ago

Released in v2.3.0