drlippman / IMathAS

IMathAS Online Math Assessment
Other
110 stars 98 forks source link

added regex check to catch lowercase abbreviated prefixes #357

Closed nick-chura closed 4 months ago

nick-chura commented 1 year ago

The issue: The system doesn't give a warning message for answers like "5 gl", because of a case-insensitivity issue in a regex. [This is an issue for any abbreviated metric prefix joined to one of the units: L, Hz, Btu]

This commit tries to fix that by adding another regex to look just at the prefix. This probably isn't ready to be merged, but I wanted to see if this is what you had in mind. I haven't been able to test it, unfortunately.