Text Formatting
When sending text on behalf of a bot in Snack or Github, several formatting options are available:
- Snack - we use regular markdown, with a twist of Wilco. Read all about this below.
- GitHub - uses GitHub flavored markdown (GFM). You can read more about it on their documentation, or check out the full GitHub Flavored Markdown Spec.
Wilco Flavored Markdown
Styling text
Style | Syntax | Example | Output |
---|---|---|---|
Bold | **text** | this is bold text | This is bold text |
Italic | _text_ | This text is italicized | This text is italicized |
Strikethrough | ~text~ | ~This was mistaken text~ | This was mistaken text |
Quoting text
You can quote text with a >
Text that is not a quote
Text that is a quote
Quoting code
Use single backtick (`) for simple code expressions:
This is code
Use triple backticks for code blocks (```)
for (const str in string) {
...
}
Instructions
Use :instruction[open a PR]
to create an inline instruction
Use :instruction[you should open a PR right away]{block=true}
to create a block with the instruction highlighted
Code Instructions
Use :codeInstruction[highlighted code instruction]
to create an inline code instruction
Use :codeInstruction[you should open a PR right away]{block=true}
to create a block with the code instruction highlighted
Links
You can create an inline link by wrapping link text in brackets [ ]
, and then wrapping the URL in parentheses ( )
: [link text](url)
. e.g., [Wilco Homepage](https://app.wilco.gg/home)
.
GIFs and Images
You can add GIFs and images in Snack messages using the following format: ![](url)
- actionId: bot_message
params:
person: keen
messages:
- text: "![](https://media.giphy.com/media/l2QE93CiS1hR6WbK0/giphy.gif)"
delay: 0
- text: Hey again!
delay: 1500
Functions
You can also use a basic JS functions manipulations like slice
split
substring
or toUpperCase
. You can also have all the Lodash utility functions, and you can use it by Lodash.someX...
Files
You can use the files from your assets folder directly using ${file.name}
Input
Use :input[clickable text to display]{text='message to type on click'}
to create an inline clickable text that will type a given message on behalf of the user.