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.

Some external functions / classes don't resolve into links

See original GitHub issue

For example, in this example in the sphinx-gallery gallery, np.linspace does not become a link, but all other numpy functions do.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dfrogercommented, May 14, 2016

I’m trying to fix this issue too. Here is where I am.

For the example, the code in docs_resolv.py behaves like this snippet:

import re

names = ['<span>np</span>', '<span>plt</span>', '<span>pd</span>']

expr = re.compile(r'(?<!\.)\b' +  '|'.join(re.escape(name) for name in names))

lines = ['<span>x</span> <span>np</span> <span>x</span>',
         '<span>x</span> <span>plt</span> <span>x</span>',
         '<span>x</span> <span>pd</span> <span>x</span>']

for line in lines:
    print(expr.search(line) is not None)

which prints:

False
True
True

In expr, word boundary \b apply only to first name of the names list. As \b does not matches < (first character in name), value name is not replaced to add <a href

The regular expression seems to want to work on something like np.linspace, where (?<!\.) prevent matching xxx.np.linspace, and \b to prevent matching xxxnp.linspace.

However, the regular expression is not used on something like np.linspace, but on:

<span class="n">np</span><span class="o">.</span><span class="n">linspace</span>
0reactions
lestevecommented, Feb 12, 2018

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c++ - Do classes have external linkage? - Stack Overflow
The correct answer is yes, the name of a class may have external linkage. The previous answers are wrong and misleading. The code...
Read more >
Shared library stopped working when external functions were ...
I am having trouble creating a shared library that I want to use in Python, and this problem appears when I call functions...
Read more >
Linker Tools Error LNK2001 - Microsoft Learn
This error is common when you declare, but don't define, variables, functions, or classes in your code. The compiler only needs a function...
Read more >
Automatic link generation - Doxygen Manual
Doxygen will automatically replace any URLs and mail addresses found in the documentation by links (in HTML). To manually specify link text, use...
Read more >
Calling external functions in App Designer - MATLAB Answers
For a final project in a MATLAB class, we're required to create a modular program using App Designer to plot data points. We've...
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