Skip to content

Instantly share code, notes, and snippets.

@almeidx
Forked from matthewzring/markdown-text-101.md
Last active May 22, 2023 22:37
Show Gist options
  • Save almeidx/41a664d8d5f3a8855591c2f1e0e07b19 to your computer and use it in GitHub Desktop.
Save almeidx/41a664d8d5f3a8855591c2f1e0e07b19 to your computer and use it in GitHub Desktop.
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

Bold **bold**

Underline bold __**underline bold**__

Bold Italics ***bold italics***

underline bold italics __***underline bold italics***__

Underline __underline__

Strikethrough ~~Strikethrough~~

Don't want to use markdown? You can slap a backslash in front of your statement, or put your message in a code block, and it'll escape the markdown formatting. You'll see those asterisks as you'd like! Just keep in mind, it doesn't work in messages with edits or underscores.

Block Quotes

The syntax to use Block Quotes is > or >>> followed by a space.

> at the beginning of a line of text, creates a single-line block quote.

one line block quote

>>> at the beginning of a line of text, creates a multi-line block quote. All text from >>> until the end of the message will be included in the quote.

multiline block quote

Code Blocks

Discord also supports code blocks as well. You can make your own code blocks by wrapping your text in backticks (`)

one line code blocks

You can also use three backticks (```) to create multiline code blocks, like this beautifully written haiku.

multiline code blocks

Syntax Highlighting

If you really want to spruce up your code blocks, you can denote a specific language for syntax highlighting, by typing the name of the language you want the code block to expect right after the first three backticks beginning your code block. An example...

syntax highlighting

There are many different languages in place of Markdown that Discord's syntax highlighting support. Each different language has its own approach to highlight-able syntax. For a full list: https://highlightjs.org/static/demo/. Note that you won't be able to view syntax highlighting on the mobile app.

asciidoc

asciidoc

autohotkey

autohotkey

bash

bash

coffeescript

coffeescript

cpp (C++)

cpp

cs (C#)

cs

css

css

diff

diff

fix

fix

glsl

glsl

ini

ini

json

json

md (markdown)

md

ml

ml

prolog

prolog

py

py

tex

tex

xl

xl

xml

xml

And you get the idea! Now you're a Discord text markdown expert. Get out there and highlight your statements!

Acknowledgements

Hammer and Chisel
Discord Highlight.js

A special thanks to Frosty#9449 for their help in making this guide.

If you have any questions or want to get in contact with me, you can add Matthew#2334 on Discord or join my support server.

@ChaseSantos
Copy link

ty

@exiztx
Copy link

exiztx commented May 7, 2019

I'm not sure I am understanding. I try using these pictures and examples to write my own Syntax highlights on Discord and it isn't working for me

@iholler
Copy link

iholler commented May 10, 2019

I'm not sure I am understanding. I try using these pictures and examples to write my own Syntax highlights on Discord and it isn't working for me

same.

@JoshLikesBeer
Copy link

I'm not sure I am understanding. I try using these pictures and examples to write my own Syntax highlights on Discord and it isn't working for me

same.

Me too. Most of the examples only show the output, not what you type to get the output, which would have been helpful.

@astiob
Copy link

astiob commented May 17, 2019

You type exactly what you see in the screenshot, preceded by a line that contains three backticks (`) and the syntax name, and followed by a line that contains just three backticks. See the first screenshot with “memes aren’t always dreams” for reference. Just replace css with the syntax name you want, and replace the “memes aren’t always dreams” line with the text/code you see in the screenshot.

Another example:

```bash
$Yellow
"Cyan"
#Grey
test echo exit red
false true cyan
if else then green
thisIsBlue(){
#!Bash
```

Copy this into Discord, and you should see the output in the “bash” screenshot above.

@loudar
Copy link

loudar commented Jul 25, 2019

Hey, is there any chance QB64 could be implemented?

@cptpiepmatz
Copy link

You can use > [text] to make a quote

@bgalvao
Copy link

bgalvao commented Oct 24, 2019

if only there was a way to format links, like this one to hackernoon

@NickRimer03
Copy link

What's the reason not to highlight code blocks on mobile devices? What about future support?
And also what about more wide support of markdown features (headers, lists, tables, etc.)?

@123321mario
Copy link

123321mario commented Dec 5, 2019

it actually works with brainfuck

```brainfuck ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.```

@almeidx
Copy link
Author

almeidx commented Mar 1, 2020

if only there was a way to format links, like this one to hackernoon

Bots can use hyperlinks, with embedded messages.

@Andre601
Copy link

Would it be possible to also add the keyboard shortcuts to achieve the various formattings (i.e. Ctrl + B for Bold, Ctrl + I for italic, etc.)

@LockDice60
Copy link

Would it be possible to also add the keyboard shortcuts to achieve the various formattings (i.e. Ctrl + B for Bold, Ctrl + I for italic, etc.)

No because ctrl+I is Inspect Element and Ctrl U is already being used So No I Mean that I know of its not possible

@almeidx
Copy link
Author

almeidx commented May 8, 2020

Would it be possible to also add the keyboard shortcuts to achieve the various formattings (i.e. Ctrl + B for Bold, Ctrl + I for italic, etc.)

No because ctrl+I is Inspect Element and Ctrl U is already being used So No I Mean that I know of its not possible

Incorrect. Developer Tools, "Inspect Element", is opened using Ctrl + Shift + I.
If you select the text you want to apply the formating to, you can use Ctrl + B, Ctrl + I, Ctrl + U for bold, italic and underline.

@Andre601
Copy link

Andre601 commented May 9, 2020

Is it possible to have "_ _ hello _ _" without it being transforming to "hello"?

Just escape it? \_\_hello__ should do the trick.
Proof: __hello__

@matheusbotbrawlstars
Copy link

oi pressiso de ajuda meus comandos nao estao funcionando

@retr0foxx
Copy link

Can i use python 3 instead of python?

@almeidx
Copy link
Author

almeidx commented Jun 4, 2020

Can i use python 3 instead of python?

No.

@retr0foxx
Copy link

retr0foxx commented Jun 13, 2020 via email

@FourCinnamon0
Copy link

Is it possible to have "_ _ hello _ _" without it being transforming to "hello"?

Just escape it? \_\_hello__ should do the trick.
Proof: hello

It doesn't work in a multi line code block

@almeidx
Copy link
Author

almeidx commented Jun 20, 2020

Is it possible to have "_ _ hello _ _" without it being transforming to "hello"?

Just escape it? \_\_hello__ should do the trick.
Proof: hello

It doesn't work in a multi line code block

On a multiline code block, you don't need to use the \'s.

This is a multiline code block:
__hello__

@SkyLeach
Copy link

SkyLeach commented Jul 8, 2020

Is there any chance/discussion of adding in support for a few more things in the discord markdown? Tables |<header>|<header>|\n|---|---|\n|<data>|<data>|, bullet points * <...>\n* <...>\n, numbered lists1)<...>\n2)<...>\n, at least some headers (say h3-hn at least), seperators like hr ____

I realize these aren't typically used in everyday messages, but they sure would help with pinned messages and detailed multipoint comments.

@Andre601
Copy link

Andre601 commented Jul 8, 2020

Is there any chance/discussion of adding in support for a few more things in the discord markdown? Tables |<header>|<header>|\n|---|---|\n|<data>|<data>|, bullet points * <...>\n* <...>\n, numbered lists1)<...>\n2)<...>\n, at least some headers (say h3-hn at least), seperators like hr ____

I realize these aren't typically used in everyday messages, but they sure would help with pinned messages and detailed multipoint comments.

The feedback portal is your best bet for suggesting those to be added, although with the exeption of ordered/unordered lists do I not see a reason why those should be added.
Additionally is this not really the place to disuss such stuff. This gist only lists the Markdown of Discord and otherwise isn't related to Discord in any way (as far as I'm aware)

@almeidx
Copy link
Author

almeidx commented Jul 8, 2020

Is there any chance/discussion of adding in support for a few more things in the discord markdown? Tables |<header>|<header>|\n|---|---|\n|<data>|<data>|, bullet points * <...>\n* <...>\n, numbered lists1)<...>\n2)<...>\n, at least some headers (say h3-hn at least), seperators like hr ____
I realize these aren't typically used in everyday messages, but they sure would help with pinned messages and detailed multipoint comments.

The feedback portal is your best bet for suggesting those to be added, although with the exeption of ordered/unordered lists do I not see a reason why those should be added.
Additionally is this not really the place to disuss such stuff. This gist only lists the Markdown of Discord and otherwise isn't related to Discord in any way (as far as I'm aware)

Correct. To give feedback to Discord go to https://feedback.discord.com

@Orangestar12
Copy link

Worth noting Hammer and Chisel Inc renamed themselves to Discord Inc a while ago. Might wanna change that.

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