ubuntu / WSL

Ubuntu WSL image build and launcher code.
MIT License
151 stars 45 forks source link

docs: Improve code blocks #482

Closed edibotopic closed 4 months ago

edibotopic commented 4 months ago

This PR improves the consistency and functionality of code blocks in the docs.

The main changes are:

A code block with the regular behaviour is written:

```{code-block) text PS C:\Users\myuser> echo $env:USERPROFILE ```

Result (note the button on cursor hover):

codeblock-regular-behaviour

If we do not want the copy button, we write:

```{code-block) text :class: no-copy C:\Users\myuser ```

Result (note the lack of button on cursor hover):

output-no-copybtn

The example below shows two lines with complex prompts and a symbol sometimes used as a prompt ($) in the commands (top). After the copy button is clicked, only the relevant information is pasted into the text editor (bottom). This means that users can more easily and quickly copy commands from the docs:

prompt-paste-nocopy

Other minor changes:

UDENG-3441

edibotopic commented 4 months ago

@CarlosNihelton --- I updated the PR with some of the following changes: