Skip to content

bpo-45640: Tokens are now clickable #29260

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

Merged
merged 2 commits into from
Nov 18, 2021
Merged

bpo-45640: Tokens are now clickable #29260

merged 2 commits into from
Nov 18, 2021

Conversation

Arthur-Milchior
Copy link
Contributor

@Arthur-Milchior Arthur-Milchior commented Oct 28, 2021

bpo-45640: Tokens are now clickable

In the current documentation, production tokens are not clickable. For example in https://docs.python.org/3/reference/expressions.html#yield-expressions , you highlight yield_from as a token but do not link to it.
I suppose that the goal, when using :token:yeld_from, was to ensure that the token links to its definition. However, Sphinx require to use :token:~python-grammar:yeld_from for the link to appear.

I suggest adding ~python-grammar after each token:.

Testing: compiling the doc and checking that the above mentioned token is now a link

https://bugs.python.org/issue45640

@ambv
Copy link
Contributor

ambv commented Nov 18, 2021

Before:
Screen Shot 2021-11-18 at 16 39 16

After:
Screen Shot 2021-11-18 at 16 39 26

@ambv ambv added the needs backport to 3.10 only security fixes label Nov 18, 2021
@ambv ambv merged commit 3295910 into python:main Nov 18, 2021
@miss-islington
Copy link
Contributor

Thanks @Arthur-Milchior for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-29621 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 18, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 18, 2021
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3295910)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
@ambv ambv added the needs backport to 3.9 only security fixes label Nov 18, 2021
@miss-islington
Copy link
Contributor

Thanks @Arthur-Milchior for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @Arthur-Milchior and @ambv, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 32959108f9c543e3cb9f2b68bbc782bddded6f42 3.9

ambv pushed a commit that referenced this pull request Nov 18, 2021
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3295910)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
ambv pushed a commit to ambv/cpython that referenced this pull request Nov 18, 2021
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 3295910)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
@bedevere-bot
Copy link

GH-29623 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Nov 18, 2021
@Arthur-Milchior Arthur-Milchior deleted the token branch November 18, 2021 20:40
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants