Markup cheatsheet
2022-05-29
Markup used at GitHub, GitLab, Bitbucket, StackOverflow, TiddlyWiki, Confluence, Jira, ubuntuusers.de, Sphinx
Whereever you edit a wiki, write software documentation, describe a task or an issue, and so on, you usually can use some form of (restricted) markup instead of having to write HTML code. Unfortunately, every platform or tool has its own markup language or dialect. Here is a quick overview of the syntax of the most important formattings for the platforms/tools that I have used so far:
Platform | GitHub / GitLab / Bitbucket / StackOverflow | Sphinx | Jira / Confluence | TiddlyWiki | ubuntuusers.de |
---|---|---|---|---|---|
Language | Markdown | reStructuredText | Textile | WikiText | MoinMoin / MediaWiki? |
italic | *italic* or _italic_ |
*emphasis* |
_emphasis_ |
//italic// |
''italic'' |
bold | **bold** or __bold__ |
**strong emphasis** |
*strong* |
''bold'' |
'''bold''' |
underscore | <u>underscore</u> |
? | +inserted+ |
__underscore__ |
__underscore__ |
~~strikethrough~~ |
? | -deleted- |
~~strikethrough~~ |
--(strikethrough)-- |
|
monospace |
`code` |
``code`` |
{{monospaced}} |
`code` |
`monotype` |
Link | [text](http://url) |
`text <http://url>`_ |
[text|http://url] |
[[text|http://url]] |
[http://url text] |
Heading 1 | # heading or heading + ======= |
==== + heading + ==== |
h1. Heading |
! Heading |
= Heading = |
Heading 2 | ## heading or heading + ------- |
heading + ----- |
h2. Heading |
!! Heading |
== Heading == |
Unordered list | * item or - item or + item |
- item |
* item |
* item |
* item |
Ordered list | 1. item |
1. item |
# item |
# item |
1. item |
Horizontal rule | --- or ___ or *** |
---- |
---- |
--- |
? |
Colored text | <span style="color:red">red</span> |
? | %{color:red}red% |
@@color:red; red@@ |
? |
Remarks
- Markdown has many dialects. I think, the common denominator is CommonMark. Different platforms (like GitHub and GitLab) have added some features (like strikethrough or tables).
- The table above contains some HTML tags as workaround for not (natively) supported formattings. These might not work everywhere.
Tables
TiddlyWiki:
| Day | Meal | Price |h
| Monday | pasta | $6 |
| Tuesday | chicken | $8 |
Markdown:
| Day | Meal | Price |
| --------|---------|-------|
| Monday | pasta | $6 |
| Tuesday | chicken | $8 |
Textile (Jira/Confluence)
||heading 1||heading 2||heading 3||
|col A1|col A2|col A3|
|col B1|col B2|col B3|