Skip to content

Commit d12d4d0

Browse files
Updating ROS2-Doc Cotr. Guildelines (#5414)
Signed-off-by: Nils-Christian Iseke <[email protected]> Signed-off-by: Tomoya Fujita <[email protected]> Co-authored-by: Tomoya Fujita <[email protected]>
1 parent 9ad2e6a commit d12d4d0

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

source/The-ROS2-Project/Contributing/Contributing-To-ROS-2-Documentation.rst

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ Compare the above with a ``bash`` ``code-block``:
482482
[INFO] [1742150439.026043867] [my_turtle]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
483483
484484
To simplify code blocks, ``bash`` can still be used without ``$`` for commands meant to be run in a terminal if the code block does not include any output lines.
485-
486485
To help choose between ``bash`` and ``console``, see the following list of use-cases and corresponding examples:
487486

488487
#. Commands meant to be copied into a script file
@@ -494,25 +493,10 @@ To help choose between ``bash`` and ``console``, see the following list of use-c
494493
export ROS_DOMAIN_ID=42
495494
ros2 run turtlesim turtlesim_node
496495
497-
#. Commands meant to be run in a terminal *without* any output lines
498-
499-
* Use ``.. code-block:: bash`` without ``$``:
500-
501-
.. code-block:: bash
502-
503-
source /opt/ros/{DISTRO}/setup.bash
504-
ros2 run turtlesim turtlesim_node
505-
506-
* Or use ``.. code-block:: console`` with ``$`` on all command lines, i.e., all lines:
496+
#. Commands meant to be run in a terminal:
507497

508-
.. code-block:: console
509-
510-
$ source /opt/ros/{DISTRO}/setup.bash
511-
$ ros2 run turtlesim turtlesim_node
512-
513-
#. Commands meant to be run in a terminal *with* output lines
514-
515-
* Use ``.. code-block:: console`` with ``$`` on all command lines:
498+
* It is highly recommended to use ``.. code-block:: console`` with ``$`` on all command lines for consistency and clarity.
499+
If there is output that needs to be displayed, include it in the same block:
516500

517501
.. code-block:: console
518502
@@ -521,6 +505,11 @@ To help choose between ``bash`` and ``console``, see the following list of use-c
521505
[INFO] [1743878028.269334696] [turtlesim]: Starting turtlesim with node name /turtlesim
522506
[INFO] [1743878028.275096618] [turtlesim]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
523507
508+
.. note::
509+
510+
If some output lines start with ``#``, it is crucial to separate commands from their output because the ``#`` symbol is used to denote a command.
511+
Therefore, place the output in a separate ``.. code-block:: text``.
512+
524513
Images
525514
^^^^^^
526515

0 commit comments

Comments
 (0)