Visitar URL original
Enable inline code highlighting with `:py:` role by namurphy · Pull Request #1698 · PlasmaPy/PlasmaPy · GitHub
Skip to content

Enable inline code highlighting with :py: role - #1698

Merged
namurphy merged 16 commits into
PlasmaPy:mainfrom
namurphy:docs-inline-code-highlighting
Aug 26, 2022
Merged

namurphy merged 16 commits into
PlasmaPy:mainfrom
namurphy:docs-inline-code-highlighting

Conversation

@namurphy

Copy link
Copy Markdown
Member

A new capability of Sphinx ≥ 5.0.0 is inline code highlighting. This PR adds rst_prolog to docs/conf.py and defines the :python: role there, and also bumps the minimum version of Sphinx to 5.0.0.

Closes #1576.

@namurphy namurphy added the prototype 🏗️ Trying out an implementation on a trial basis label Aug 26, 2022
@github-actions github-actions Bot added the docs PlasmaPy Docs at http://docs.plasmapy.org label Aug 26, 2022
@codecov

codecov Bot commented Aug 26, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #1698 (689e3a2) into main (ae2ad84) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1698      +/-   ##
==========================================
- Coverage   97.65%   97.64%   -0.01%     
==========================================
  Files          85       85              
  Lines        8128     8126       -2     
==========================================
- Hits         7937     7935       -2     
  Misses        191      191              
Impacted Files Coverage Δ
plasmapy/particles/particle_collections.py 99.16% <0.00%> (-0.06%) ⬇️
plasmapy/particles/ionization_state.py 94.04% <0.00%> (-0.02%) ⬇️
plasmapy/particles/atomic.py 100.00% <0.00%> (ø)
plasmapy/particles/__init__.py 95.83% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@namurphy

Copy link
Copy Markdown
Member Author

Screenshot from 2022-08-25 23-09-58

From a test I did in the changelog entry. It works!

@github-actions github-actions Bot added contributor guide and removed docs PlasmaPy Docs at http://docs.plasmapy.org labels Aug 26, 2022
We'll probably use this often enough to justify a shorter name,
especially since it's pretty unambigious that "py" refers to
Python here and not something like pyelonephritis.
@namurphy namurphy changed the title Enable inline code highlighting with :python: role Enable inline code highlighting with :py: role Aug 26, 2022
The inline code highlighting reminded me that lambda is its own thing in
Python, so it doesn't show up as intended with the code highlighting. I'm
thinking of this example as in a generic language.
@namurphy namurphy added docs PlasmaPy Docs at http://docs.plasmapy.org and removed prototype 🏗️ Trying out an implementation on a trial basis labels Aug 26, 2022
@namurphy
namurphy marked this pull request as ready for review August 26, 2022 04:04
@github-actions github-actions Bot removed the docs PlasmaPy Docs at http://docs.plasmapy.org label Aug 26, 2022
@namurphy
namurphy merged commit a34a6c8 into PlasmaPy:main Aug 26, 2022
@namurphy
namurphy deleted the docs-inline-code-highlighting branch August 26, 2022 17:53
namurphy added a commit to namurphy/PlasmaPy that referenced this pull request Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable inline code highlighting via Sphinx 5.0.0

2 participants