ncm2: Set 'abbr' to empty string if not set
While setting up the new combine
matcher (which is great, thanks!) for vimtex, I noticed that ncm2 initializes the abbr
field to word
in https://github.com/ncm2/ncm2/blob/master/pythonx/ncm2.py#L85. Is there a specific reason for this? This prevents me from matching word
more strictly than abbr
; for this purpose,
if 'abbr' not in e or type(e['abbr']) != str:
e['abbr'] = ''
would be needed. (This would also be more consistent with the other fields.)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (9 by maintainers)
FYI, I’ve replaced the boring pure text explanation with a more interactive script example. https://github.com/ncm2/ncm2/commit/0bf906b76636dc6ac5635660e884229138b8608d
It should be way more helpful for debugging and understand how ncm2 works.