Skip to content

Instantly share code, notes, and snippets.

@herbetom
Last active July 6, 2021 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herbetom/928374d3f70c5d016a9699283587a1c4 to your computer and use it in GitHub Desktop.
Save herbetom/928374d3f70c5d016a9699283587a1c4 to your computer and use it in GitHub Desktop.
Markdown Code Blocks

Markdown Code Formatting

Sending code, logs, or commands in a Markdown-enabled chat client (Element, Gitter, Mattermost, Rocket.Chat and probably others) without using code styling makes messages more cluttered than necessary.

Using it is actually relatively simple, and the effect is quite visible:

Code Blocks

Simple Code Block

```
This is some code
```

It looks like this:

This is some code

With syntax Highlighting

not everywhere available, keywods differ

```python
s = "Python syntax highlighting"
print s
```

It looks like this:

s = "Python syntax highlighting"
print s

Inline Code

Inline `code` is also quite simple to achieve. 

It looks like this:

Inline code is also quite simple to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment