question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set 'abbr' to empty string if not set

See original GitHub issue

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.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
roxmacommented, Jul 18, 2018

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.

0reactions
roxmacommented, Jul 18, 2018

Ok, now both versions are available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# shorthand for if not null then assign value - Stack Overflow
I get that, if testVar1 is null though I dont want testVar2 being set to anything at all as even if it's set...
Read more >
3 Ways to Set Default Value in JavaScript | SamanthaMing.com
Let's break down the 3 different ways to set Default Values using logical operator, ternary, and if/else...
Read more >
Empty string - Rosetta Code
Demonstrate how to check that a string is not empty. ... Strip a set of characters from a string · Strip whitespace from...
Read more >
<abbr>: The Abbreviation element - HTML - MDN Web Docs
When an abbreviation is used and you want to provide an expansion or definition outside the flow of the document's content, use <abbr>...
Read more >
Commands - fish shell
The default key binding can be set by specifying a SEQUENCE of the empty string (that is, '' ). It will be used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found