-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix sphinx code-block types (syntax highlighting) in two docs #4783
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
Fix sphinx code-block types (syntax highlighting) in two docs #4783
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4783 +/- ##
==========================================
+ Coverage 93.75% 95.92% +2.16%
==========================================
Files 113 113
Lines 25036 26758 +1722
Branches 2483 2982 +499
==========================================
+ Hits 23473 25668 +2195
+ Misses 1236 779 -457
+ Partials 327 311 -16
Continue to review full report at Codecov.
|
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.
Please remove the added $
as commented earlier. 👍
sure. just wanted to add a few more docs before making new commit |
No worries, take your time. Just wanted to let it be explicit here in the PR that we are waiting for new changes to be submitted. 👍 (easier for us maintainers to see which PRs require our attention) |
It is possible to use fixtures using the ``getfixture`` helper:: | ||
It is possible to use fixtures using the ``getfixture`` helper: | ||
|
||
.. code-block:: text |
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.
rst
instead of text
?
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 actually tried it first, but those files have doctest
-syntax (valid python) and plain text as comments (valid for doctests). And no actual rst
markup.
As as result there is no improvement in how they look on a web-page.
If you then have a text file like this:: | ||
If you then have a text file like this: | ||
|
||
.. code-block:: text |
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.
rst
instead of text
?
ready for review |
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 a lot @gyermolenko!
Waiting for @Zac-HD's final comments (no rush). 👍 |
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.
LGTM 😎
@Zac-HD feel free to do the honors! 👍 |
Default sphinx highlight language here is


python
, which is effective for all code-blocks after::
.As a result we sometimes see erroneous highlights like these
Fixes are in two docs only (
doctest.rst
andpythoncollection.rst
) and if this PR is ok I could probably fix others.