Skip to content

Commit d75086a

Browse files
committed
README: FIX code block syntax highlighting.
1 parent 57d36a6 commit d75086a

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

README.rst

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,36 +58,40 @@ You'll need to fork the `python-docs-fr
5858
button. This creates a copy of the whole project on your github
5959
account: a place where you have the rights to do modifications.
6060

61-
Step by steps::
61+
Step by steps:
62+
63+
.. code-block:: bash
6264
6365
# Git clone your github fork using ssh (replace JulienPalard):
64-
$ git clone git@github.com:JulienPalard/python-docs-fr.git
66+
git clone git@github.com:JulienPalard/python-docs-fr.git
6567
6668
# Go to the cloned directory:
67-
$ cd python-docs-fr/
69+
cd python-docs-fr/
6870
6971
# Add the upstream (the public repository) using HTTPS (won't ask for password):
70-
$ git remote add upstream https://github.com/python/python-docs-fr.git
72+
git remote add upstream https://github.com/python/python-docs-fr.git
7173
7274
73-
Now you're ready to start a work session, each time you'll start a new task, start here::
75+
Now you're ready to start a work session, each time you'll start a new task, start here:
76+
77+
.. code-block:: bash
7478
7579
# To work, we'll need a branch, based on an up-to-date (freshly fetched)
7680
# upstream/3.7 branch, let's say we'll work on glossary so we name
7781
# the branch "glossary":
78-
$ git fetch upstream
79-
$ git checkout -b glossary upstream/3.7
82+
git fetch upstream
83+
git checkout -b glossary upstream/3.7
8084
8185
# You can now work on the file, typically using poedit,
8286
# then commit your work with a nice explicit message:
83-
$ git commit -a -m "Working on glossary."
87+
git commit -a -m "Working on glossary."
8488
8589
# Then push your modifications to your github clone,
8690
# as they are ephemeral branches, let's not configure git to track them all,
8791
# "origin HEAD" is a "special" syntax to say "Push on origin,
8892
# on a branch with the same name as the local one",
8993
# it's nice as it's exactly what we want:
90-
$ git push origin HEAD
94+
git push origin HEAD
9195
9296
# Now you can open the pull request on github, just go to
9397
# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"
@@ -96,10 +100,10 @@ Now you're ready to start a work session, each time you'll start a new task, sta
96100
# Now someone is reviewing your modifications, and you'll want to fix their
97101
# findings, get back to your branch
98102
# (in case you started something else on another branch):
99-
$ git checkout glossary
103+
git checkout glossary
100104
# Fix the issues, then commit again:
101-
$ git commit -a -m "glossary: small fixes."
102-
$ git push origin HEAD
105+
git commit -a -m "glossary: small fixes."
106+
git push origin HEAD
103107
104108
105109
You may have noted that this looks like a triangle, with a missing segment:
@@ -227,12 +231,16 @@ Simplify git diffs
227231

228232
Git diffs are often crowded with useless line number changes, like:
229233

234+
.. code-block:: diff
235+
230236
-#: ../Doc/library/signal.rst:406
231237
+#: ../Doc/library/signal.rst:408
232238
233239
To tell git they are not usefull information, you can do the following
234240
after ensuring ``~/.local/bin/`` is in your ``PATH``.
235241

242+
.. code-block:: bash
243+
236244
cat <<EOF > ~/.local/bin/podiff
237245
#!/bin/sh
238246
grep -v '^#:' "\$1"
@@ -254,7 +262,9 @@ like::
254262
├── python-docs-fr/
255263
└── cpython/
256264
257-
To clone CPython you may use::
265+
To clone CPython you may use:
266+
267+
.. code-block:: bash
258268
259269
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git
260270

0 commit comments

Comments
 (0)