-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-104679 Fixed syntax highlighting in turtle docs #104682
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
gh-104679 Fixed syntax highlighting in turtle docs #104682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Mostly looks good, one suggestion.
Doc/library/turtle.rst
Outdated
>>> screen.register_shape("turtle.gif") | ||
|
||
.. note:: | ||
Image shapes *do not* rotate when turning the turtle, so they do not | ||
display the heading of the turtle! | ||
.. note:: | ||
Image shapes *do not* rotate when turning the turtle, so they do not | ||
display the heading of the turtle! | ||
|
||
(2) *name* is an arbitrary string and *shape* is a tuple of pairs of | ||
coordinates: Install the corresponding polygon shape. | ||
|
||
.. doctest:: | ||
:skipif: _tkinter is None | ||
.. doctest:: | ||
:skipif: _tkinter is None | ||
|
||
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3))) | ||
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the indent might have been correct before? The HTML looks better nested.
Before: https://docs.python.org/3.12/library/turtle.html#turtle.addshape

After: https://cpython-previews--104682.org.readthedocs.build/en/104682/library/turtle.html#turtle.addshape

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. My bad. Will fix soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hugovk Fixed. Is that fine ? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem 👍 and thank you
…com/millefalcon/cpython into fix/syntax-highlighting-turtle-docs
Thanks @millefalcon for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @millefalcon and @hugovk, I could not cleanly backport this to |
@millefalcon Would you like to make the same change for the |
@hugovk Sure. Let me check what one needs to do for targetting a specific branch. Thanks 👍 |
GH-104695 is a backport of this pull request to the 3.11 branch. |
…onGH-104682). (cherry picked from commit 2c97878) Co-authored-by: han-solo <hanish0019@gmail.com>
Fixed indentation for the code snippets in
turtle
library docs which was causing syntax highlighting issuescloses #104679
📚 Documentation preview 📚: https://cpython-previews--104682.org.readthedocs.build/