liblouis icon indicating copy to clipboard operation
liblouis copied to clipboard

match opcode missing %m for math characters

Open jrbowden opened this issue 3 years ago • 1 comments

The match opcode can match on a variety of character attributes, e.g. %a for alphabetic, %# for digits etc. Not all character attributes are currently available to test with % testing for a math character is missing.

Suggest m would be a good option.

This might be a simple fix simply adding the following lines in pattern.c:

case 'm':
attr0 |= CTC_Math;
break;

For completeness, I suggest all character attributes should be available in match, as they are in context.

jrbowden avatar Jun 03 '21 14:06 jrbowden

Thanks for creating the issue @jrbowden. I created a test: https://github.com/liblouis/liblouis/commit/26553dbcdda1820bbbcde0d71915486c1ce3c57e

bertfrees avatar Jun 03 '21 15:06 bertfrees