mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 23:47:16 +02:00
Change doc style for code
This commit is contained in:
parent
bad81b0c5a
commit
9d0cd4c2fb
4 changed files with 73 additions and 15 deletions
|
|
@ -279,6 +279,57 @@ class CmdEcho(Command):
|
|||
self.caller.msg(self.args.strip())
|
||||
```
|
||||
|
||||
For examples of using the Python command-line, use `python` language and `>>>` prompt.
|
||||
````
|
||||
```python
|
||||
>>> print("Hello World")
|
||||
Hello World
|
||||
```
|
||||
````
|
||||
|
||||
```python
|
||||
>>> print("Hello World")
|
||||
Hello World
|
||||
```
|
||||
|
||||
When showing an in-game command, use the `shell` language type and `>` as the prompt.
|
||||
Indent returns from the game.
|
||||
|
||||
````
|
||||
```shell
|
||||
> look at flower
|
||||
Red Flower(#34)
|
||||
A flower with red petals.
|
||||
```
|
||||
````
|
||||
|
||||
```shell
|
||||
> look at flower
|
||||
Red Flower(#34)
|
||||
A flower with red petals.
|
||||
```
|
||||
|
||||
|
||||
For actual shell prompts you can either use `bash` language type or just indent the line.
|
||||
Use `$` for the prompt when wanting to show what is an input and what is an output, otherwise
|
||||
skip it - it can be confusing to users not that familiar with the command line.
|
||||
|
||||
````
|
||||
```bash
|
||||
$ ls
|
||||
evennia/ mygame/
|
||||
```
|
||||
evennia start --log
|
||||
````
|
||||
|
||||
```bash
|
||||
$ ls
|
||||
evennia/ mygame/
|
||||
```
|
||||
|
||||
evennia start --log
|
||||
|
||||
|
||||
## MyST directives
|
||||
|
||||
Markdown is easy to read and use. But while it does most of what we need, there are some things it's
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue