ODNZSL / nzsl-dictionary-scripts

Scripts needed to support the NZSL mobile applications
MIT License
3 stars 2 forks source link

Update to support ampersand characters in sign data #6

Closed joshmcarthur closed 6 years ago

joshmcarthur commented 6 years ago

Recent updates to the dictionary have introduced signs that have usage instructions including ampersand characters (for example "L&P"). We cannot do a straight substitution here, because ampersand characters also have meaning when used as entity references. This patch adds a regex that replaces ampersand characters that are not trailed by a '#' character with the appropriate sequence for an ampersand character to be ultimately rendered.