Corrected formatting of multi-line code block - #13806
Conversation
tirkarthi
left a comment
There was a problem hiding this comment.
This improves over the current formatting which makes 2 lines appear as a single line at https://docs.python.org/3/c-api/buffer.html#numpy-style-shape-and-strides. With PR
Thanks.
|
@tirkarthi You're welcome. Should I do anything about the missing semicolon at the end of the first line? |
|
I guess for the short snippet semicolon is implicit. I don't have a strong opinion about it. Maybe you can add it if the core dev who will be merging it makes the suggestion. |
|
Since this is C code, there should likely be a semicolon at the end of that line. Certainly in a code example in the docs, there should be a semicolon at the end of a simple statement. Please do add it while we're here! |
|
@taleinat Done. Sorry it took so long. I usually take less than 8 days to type one character :) |
taleinat
left a comment
There was a problem hiding this comment.
ISTM we should use .. code-block:: c for this code block, so that it is properly marked up as C code.
Incorrect formatting can be seen here: https://docs.python.org/3/c-api/buffer.html#numpy-style-shape-and-strides
|
@taleinat I added the |
Indeed! |
|
Thanks @madphysicist for the PR, and @taleinat for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
(cherry picked from commit bd26a44) Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
|
GH-14805 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit bd26a44) Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
|
GH-14806 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit bd26a44) Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
(cherry picked from commit bd26a44) Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
|
Thanks for contributing this fix, @madphysicist! |


Trivial change. Replaced
``around block with::before it.