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

Regression in rendering restructuredText sourcecode directive #1806

Open
trevorld opened this issue May 17, 2024 · 2 comments
Open

Regression in rendering restructuredText sourcecode directive #1806

trevorld opened this issue May 17, 2024 · 2 comments

Comments

@trevorld
Copy link

This is a refinement of #1796

Officially docutils and most other rst renderers like pandoc support three source code directives: code, code-block, and sourcecode. I'm observing that Github restored support for rendering code and code-block directives but that although it rendered the sourcecode directive for years the sourcecode code blocks are still no longer rendering correctly.

.. sourcecode:: python

  print(2 + 2)

I have a minimal github repo as an example: https://github.com/trevorld/github_rst_code_rendering

{knitr} uses the sourcecode directive when converting README.Rrst files into README.rst files so this still affects some of my repos.

Here are some links to the docutils and pandoc source code where they explictly support all three of these:

trevorld added a commit to trevorld/r-ledger that referenced this issue May 17, 2024
* README looked bad on Github due to a regression
  in rendering `sourcecode` blocks:

  github/markup#1806

* {knitr} uses `sourcecode` when rendering `README.Rrst` files
  to `README.rst` so this is just a temporary fix.
trevorld added a commit to trevorld/r-optparse that referenced this issue May 17, 2024
* README looked bad on Github due to a regression
  in rendering `sourcecode` blocks:

  github/markup#1806

* {knitr} uses `sourcecode` when rendering `README.Rrst` files
  to `README.rst` so this is just a temporary fix.
trevorld added a commit to piecepackr/piecenikr that referenced this issue May 17, 2024
* README looked bad on Github due to a regression
  in rendering `sourcecode` blocks:

  github/markup#1806

* {knitr} uses `sourcecode` when rendering `README.Rrst` files
  to `README.rst` so this is just a temporary fix.
trevorld added a commit to piecepackr/piecepackr that referenced this issue May 17, 2024
* README looked bad on Github due to a regression
  in rendering `sourcecode` blocks:

  github/markup#1806

* {knitr} uses `sourcecode` when rendering `README.Rrst` files
  to `README.rst` so this is just a temporary fix.
@TicaMica1971
Copy link

pekkaklarck added a commit to robotframework/robotframework that referenced this issue May 29, 2024
@pekkaklarck
Copy link

I noticed our docs looked odd as well, but luckily the workaround to replace .. sourcecode:: with .. code:: worked. Thanks for investigation @trevorld.

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

No branches or pull requests

3 participants