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.

unwanted html links inserted

See original GitHub issue

Describe the bug

If a pattern resembling a URL occurs in the markdown of an ipynb file then it is tagged <a class="reference external"> in the built html and appears as a broken link, despite no link being requested in the markdown syntax (i.e. no []()). This affects things like filenames, presumably because of the presence of the . character.

Maybe this is a desired feature rather than a bug. But it seems like an undesirable one to have set by default. As far as I can find, it is also undocumented. A response to an old issue #1068 suggests that MyST markdown should not automatically hyperlink URLs.

Is this the work of the linkify myst extension? But the documentation on sphinx configuration claims that this extension is not enabled by default. Or is it maybe the result of the default setting myst_url_schemes: None? In which case, what should this setting be in order to disable automatic recognition of URLs?

To Reproduce

  • Clone this minimal example repo.
  • Run jupyter-book build a_short_book.
  • View the file a_short_book/_build/html/page1.html.
  • The phrase program.py is tagged as a link. (Though not my_program.py, the presence of an underscore seems to prevent it.)

Expected behavior

No html link should be inserted unless requested in the markdown. (Or failing that, the documentation should warn about this behavior).

Environment

  • Python Version: 3.8.10
  • Package versions or output of jupyter-book --version:
    • Jupyter Book: 0.11.1
    • External ToC: 0.2.2
    • MyST-Parser: 0.13.7
    • MyST-NB: 0.12.3
    • Sphinx Book Theme: 0.1.0
    • Jupyter-Cache: 0.4.2
    • NbClient: 0.5.3
  • Operating System: Ubuntu 20.04.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Remove HTML links - Html-cleaner.com
You can do the same thing using the WYSIWYG editor of the HTML Cleaner. Just select the text where you want to remove...
Read more >
Unwanted links in HTML document - Stack Overflow
I need help about removing unwanted links in my HTML document. The problem is that every element in my document that is located...
Read more >
Topic: WordPress inserts unwanted code in links
WordPress inserts unwanted code in links · 1. Enter the relevant descriptive anchor text you want to link to first. Note that “here”...
Read more >
Unwanted hyperlinks containing 'msocom1' inserted into my ...
I've checked a sample and all seem to be similar to my situation - they are nonsensical text inserted in the content (whether...
Read more >
Remove or turn off hyperlinks - Microsoft Support
Remove a hyperlink. To remove a hyperlink but keep the text, right-click the hyperlink and click Remove Hyperlink. Right click menu, Remove Hyperlink....
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