doc: Configure copybutton extension for ignoring shell prompts
Add required settings for telling the copybutton Sphinx extension to ignore prompts when copying a code block. Both bash prompt and Zephyr UART prompt are ignored. Examples of the new behavior: .. code-block:: console $ echo "Hello World" Hello World The copied text will be: 'echo "Hello World"'. .. code-block:: console uart:~$ l2cap connect 29 Chan sec: 1 L2CAP connection pending Channel 0x20000210 connected Channel 0x20000210 status 1 uart:~$ l2cap send 3 14 Rem 2 Rem 1 Rem 0 Outgoing data channel 0x20000210 transmitted Outgoing data channel 0x20000210 transmitted Outgoing data channel 0x20000210 transmitted The copied text will be: 'l2cap connect 29\nl2cap send 3 14'. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
b640bbe1f7
commit
b3a52f4882
1 changed files with 5 additions and 0 deletions
|
@ -313,6 +313,11 @@ graphviz_dot_args = [
|
|||
"-Ecolor=gray60",
|
||||
]
|
||||
|
||||
# -- Options for sphinx_copybutton ----------------------------------------
|
||||
|
||||
copybutton_prompt_text = r"\$ |uart:~\$ "
|
||||
copybutton_prompt_is_regexp = True
|
||||
|
||||
# -- Linkcheck options ----------------------------------------------------
|
||||
|
||||
extlinks = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue