Skip to content

Conversation

@ncclementi
Copy link
Contributor

Note: Check conflicts when merging since there are multiple PRs ongoing touching several files.

This PR

  • Adds this to the config.py fixes the multiline copying issue in .md.
copybutton_line_continuation_character = "\\"

In .md files (it's ok in .ipynb for some reasons) we can't add comments inline of a multiline bash command like this, but seems a reasonable thing to avoid.

```console
$ docker run --gpus all --rm -it \
    --shm-size=1g --ulimit memlock=-1 \
    -p 8888:8888 -p 8787:8787 -p 8786:8786 \ # this will break the copying, omitting anything after the comment
    rapidsai/notebooks:25.10a-cuda12.9-py3.12
```
  • Standardizes the usage of console and bash. Console is used in anything that is a command line block, and uses bash for anything that is a bash script, as in .sh file.
  • Adds guidance to the readme on what to use when.

Out of scope:

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this.

I found myself leaving the same comment so instead of doing that on every instance I'll just write it here.

We only want to use console when we are showing output from the command. Otherwise we should just use bash. Many markdown linters will complain about console blocks without output.

flowchart TD
    A[Single line command or multi-line script]
    A -->|multi| B[```bash]
    A -->|single| C[Does the command have output?]
    C -->|no| B
    C -->|yes| D[```console]
Loading

Comment on lines 37 to 39
```console
$ ssh -i <path-to-your-ssh-key-dir>/your-key-file.pem ubuntu@<ip address>
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console blocks are for showing a command and it's output. Given that there is no output here it should just stay as bash.


```bash
az aks create -g <resource group> -n rapids \
```console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No output, should be bash


```bash
az aks nodepool add \
```console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No output should be bash

@ncclementi
Copy link
Contributor Author

Ok, I modified this PR to make sure it uses console only when there is output, and wrote this on the guidelines in the README I think got them all.

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for going over this again, I know it's a bit of a tedious one.

Unfortunately I think you also need to go through and remove the $ from the bash blocks too.

@jacobtomlinson jacobtomlinson merged commit ec1de44 into rapidsai:main Sep 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write guidelines of use of$ in bash/console commands [DOC] fix code blocks in md files to correctly identify code for copying

2 participants