Skip to content

md code block params not compiled to rst correctly #2728

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

Open
TheTripleV opened this issue Sep 6, 2024 · 2 comments · May be fixed by #3034
Open

md code block params not compiled to rst correctly #2728

TheTripleV opened this issue Sep 6, 2024 · 2 comments · May be fixed by #3034
Assignees

Comments

@TheTripleV
Copy link
Member

```Java
:lineno-start: 19
PWMSparkMax armMotorCtrl;

might need a newline there, unsure

@TheTripleV TheTripleV self-assigned this Sep 6, 2024
@sciencewhiz
Copy link
Collaborator

I tried new lines both before and after the :lineno-start: and it didn't help

@sciencewhiz
Copy link
Collaborator

I'm pretty sure the issue is that redown adds two newlines after the code-block. When there's an option for the code block, like the lineno, the second newline shouldn't be added.

ret += btindent + f".. code-block:: {lang}\n\n"

sciencewhiz added a commit to sciencewhiz/frc-docs that referenced this issue May 13, 2025
Don't automatically add 2 newlines after a code block, check to see if
there's options after, and only add a newline after the options are
added.
This fixes the code blocks in the stacktrace page.
Fixes wpilibsuite#2728
@sciencewhiz sciencewhiz linked a pull request May 13, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants