Markdown inline links break when ) in the url, reference style links do not
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
Hallo,
When there is a closing parenthesis in the URL and one wants to use markdown's inline link style the link breaks.
```
[Link](https://example.com/?test=this(fails)here)
```
produces a link that ends before the "here)".
In contrast to this behaviour the reference style links work as expected:
```
[Link][1]
[1]: https://example.com/?test=this(does)not_fail
```
produces a link that goes to the expected destination.
I created a [minimal working example](https://gist.github.com/smartsammler/ab7f360321b16a834f5dfe55d654908a) that has both the Notebook as well as the HTML export, if you cannot reproduce the behaviour I have got.
The About page says:
> You are using Jupyter notebook.
> The version of the notebook server is 5.0.0 and is running on:
> Python 3.6.2 (default, Jul 19 2017, 13:09:21) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]
> Current Kernel Information:
> Python 3.6.2 (default, Jul 19 2017, 13:09:21) Type 'copyright', 'credits' or 'license' for more information IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
PS:
[Markdown](https://pypi.python.org/pypi/Markdown) renders it correctly and this GitHub-comment does so, too.
Contributor guide
Research direction
Start with the linked minimal working example and reproduce the inline-link case in both the notebook and HTML export, comparing it with the reference-style link. Trace the Markdown rendering path and make the inline URL preserve balanced closing parentheses, then verify that both examples produce the expected destination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100