Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: fix whitespaces in Markdown links #3716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

medvied
Copy link

@medvied medvied commented Mar 13, 2023

I've found a bug with how a link to "output widget examples" is rendered here.

The root cause is that Markdown doesn't allow whitespaces in link destinations, so either whitespaces should be replaced with %20 for the links to work or the entire URI should be enclosed in pointy bracketes (reference: https://spec.commonmark.org/0.30/#example-487).

I've looked at neighbor links to see how it was done there and then decided to go with %20 to make it uniform.

Then I made a regexp to find all instances of such an issue:

git grep -n -P '\[[^\]]*?\]\([^ )]*? [^)]*?\)'

This patch adds %20 to Markdown links in docs/source/examples/ and changes an absolute URL pointing to https://ipywidgets.readthedocs.io/ to a relative link in one of the cases with the issue.

I've found a bug with how a link to "output widget examples" is rendered
[here](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html#output).

The root cause is that Markdown doesn't allow whitespaces in link destinations, so
either whitespaces should be replaced with `%20` for the links to work or the
entire URI should be enclosed in pointy bracketes (reference:
https://spec.commonmark.org/0.30/#example-487).

I've looked at neighbor links to see how it was done there and then decided to
go with `%20` to make it uniform.

Then I made a regexp to find all instances of such an issue:

    git grep -n -P '\[[^\]]*?\]\([^ )]*? [^)]*?\)'

This patch adds `%20` to Markdown links in `docs/source/examples/` and changes
an absolute URL pointing to https://ipywidgets.readthedocs.io/ to a
relative link in one of the cases with the issue.
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch medvied/ipywidgets/fix-links-with-whitespaces-in-markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant