Skip to content

Commit 53356dc

Browse files
committed
chapter9: format *docker ps*
This commit adds '*'s and [subs="quotes"] to make bold shell commands - docker ps - docker kill in listing blocks. This makes these shell commands appear as other shell commands on the page do -- in bold in listing blocks. = Background == I previously removed the '*'s and now I am adding them back. Why? In an earlier commit (b65eb46) I removed '*'s from *docker ps*. I removed '*'s because the text I saw on https://www.obeythetestinggoat.com/book/chapter_09_docker.html included $ *docker ps That is, '*docker' appeared on the rendered page. I took it as given that the current version of the source code is deployed on https://www.obeythetestinggoat.com/book/chapter_09_docker.html. [That conclusion was incorrect.] Because I took it as given that the current version of the source is deployed on the site, I thought there was a problem with $ *docker ps* in the current version of the source code. So, I removed the *'s. == The reason for *docker on the site Commit (c2b60ee) contains ``` $ *docker ps CONTAINER ID ``` on lines 854-855. I hypothesize a version of the file with that in place is what is deployed on the site and is the cause of what I saw on the page. Commit (97e9f60) added a second star ``` $ *docker ps* ``` but this is not yet deployed (I believe). == This commit adds [subs="quotes"] before the listing blocks for `docker ps` and `docker kill` The file contains format directives elsewhere that use [subs="quotes"] before a block listing. Further, this seems correct given what I read on these pages: - https://docs.asciidoctor.org/asciidoc/latest/subs/apply-subs-to-blocks/ - https://docs.asciidoctor.org/asciidoc/latest/subs/quotes/ Alternatively, [subs="macros"] with $ pass:quotes[*docker ps*] seems to work. I read https://github.com/hjwp/Book-TDD-Web-Dev-Python?tab=readme-ov-file#building-the-book-as-html and built chapter_09_docker.html locally and it looks how I expect. I will attach an image.
1 parent 218b6a6 commit 53356dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chapter_09_docker.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,9 @@ The docker daemon lets you list all the currently running containers
862862
with `docker ps`:
863863
864864
[role="skipme small-code"]
865+
[subs="quotes"]
865866
----
866-
$ docker ps
867+
$ *docker ps*
867868
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
868869
0818e1b8e9bf superlists "/bin/sh -c 'python …" 4 seconds ago Up 4 seconds hardcore_moore
869870
----
@@ -874,8 +875,9 @@ and a randomly-generated name (you can override that if you want to).
874875
We can use the ID or the name to kill the container with `docker kill`:
875876
876877
[role="skipme"]
878+
[subs="quotes"]
877879
----
878-
$ docker kill 0818e1b8e9bf
880+
$ *docker kill 0818e1b8e9bf*
879881
0818e1b8e9bf
880882
----
881883

0 commit comments

Comments
 (0)