Skip to content

Commit ae59c8d

Browse files
authored
Merge pull request #519 from apinnick/ellipses-yaml-code-blocks
Ellipses yaml code blocks
2 parents 644dc6b + baef5c3 commit ae59c8d

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

supplementary_style_guide/style_guidelines/code-commands.adoc

+22-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Do not rely solely on a shell prompt in a sample command to indicate the require
2121
If you include a shell prompt to indicate that a user with root privileges must run the command, also include a statement about this requirement in the step text, the introductory text, or the prerequisites.
2222
====
2323
+
24-
* When a sample command includes `sudo`, use the `$` prompt, not `#`, as shown in the following example:
24+
* When a sample command includes `sudo`, use the `$` prompt, not `#`, as shown in the following example:
2525
+
2626
[source,terminal]
2727
----
2828
$ sudo systemctl start firewalld
2929
----
3030
+
31-
* If multiple commands in a procedure require root privileges, add introductory content to tell the user about the requirement.
31+
* If multiple commands in a procedure require root privileges, add introductory content to tell the user about the requirement.
3232
The following example shows one way that you could integrate a requirement for root access into the introduction for a procedure:
3333
+
3434
.Example AsciiDoc
@@ -39,6 +39,26 @@ Some tasks in this procedure require root privileges, which you can get temporar
3939
.Additional resources
4040
* link:https://www.redhat.com/sysadmin/difference-between-sudo-su[Exploring the differences between sudo and su commands in Linux]
4141

42+
[[ellipses-in-yaml-code-blocks]]
43+
== Ellipses in YAML code blocks
44+
45+
Use the number sign (`#`) to comment out an ellipsis in YAML code blocks.
46+
YAML reserves `...` to indicate the end of a document without starting a new document.
47+
48+
.Example AsciiDoc
49+
50+
[source,yaml]
51+
----
52+
apiVersion: operator.openshift.io/v1alpha1
53+
kind: CertManager
54+
metadata:
55+
name: cluster
56+
# ...
57+
----
58+
59+
.Additional resources
60+
* link:https://yaml.org/spec/1.2.2/#22-structures[YAML 1.2: Structures]
61+
4262
[[ip-addresses-and-mac-addresses]]
4363
== IP addresses and MAC addresses
4464

0 commit comments

Comments
 (0)