digitallinguistics / dlx2html

A JavaScript library for converting linguistic data to HTML
MIT License
2 stars 0 forks source link

option: `glosses` #26

Closed dwhieb closed 8 months ago

dwhieb commented 12 months ago

Support a glosses option with the following values:

status value description
false (default) Do not wrap glosses in <abbr> tags.
true Any glosses in CAPS will be wrapped in an <abbr> tag. Warning: This will also wrap acronyms like NSF or all-caps words like I.

You don't need to parse the string of glosses to do this. Just search for numbers or sequences of capital letters to wrap in abbreviations. You don't even need to separate the combined person-number glosses; the <abbr> tags should be butted up next to each other with no separator.