For GitLab we developed something we call "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few significant ways to add some useful functionality.
For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).
It extends the standard Markdown in a few significant ways to add some useful functionality.
You can use GFM in
You can use GFM in
...
@@ -51,16 +67,20 @@ Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#mar
...
@@ -51,16 +67,20 @@ Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#mar
Newlines
Newlines
--------
--------
The biggest difference that GFM introduces is in the handling of linebreaks. With traditional Markdown you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors. GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.
GFM honors the markdown specification in how [paragraphs and line breaks are handled](http://daringfireball.net/projects/markdown/syntax#p).
The next paragraph contains two phrases separated by a single newline character:
A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines.:
Roses are red
Roses are red
Violets are blue
Violets are blue
Sugar is sweet
Roses are red
Roses are red
Violets are blue
Violets are blue
Sugar is sweet
Multiple underscores in words
Multiple underscores in words
-----------------------------
-----------------------------
It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words.
It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words.
...
@@ -319,13 +339,13 @@ Strikethrough uses two tildes. ~~Scratch this.~~
...
@@ -319,13 +339,13 @@ Strikethrough uses two tildes. ~~Scratch this.~~
## Links
## Links
There are two ways to create links.
There are two ways to create links, inline-style and reference-style.
[I'm an inline-style link](https://www.google.com)
[I'm an inline-style link](https://www.google.com)
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[I'm a relative reference to a repository file](LICENSE)
[You can use numbers for reference-style link definitions][1]
[You can use numbers for reference-style link definitions][1]
...
@@ -341,7 +361,7 @@ There are two ways to create links.
...
@@ -341,7 +361,7 @@ There are two ways to create links.
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[I'm a relative reference to a repository file](LICENSE)
[You can use numbers for reference-style link definitions][1]
[You can use numbers for reference-style link definitions][1]
...
@@ -353,6 +373,15 @@ Some text to show that the reference links can follow later.
...
@@ -353,6 +373,15 @@ Some text to show that the reference links can follow later.
[1]: http://slashdot.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com
[link text itself]: http://www.reddit.com
**Note**
Relative links do not allow referencing project files in a wiki page or wiki page in a project file.
The reason for this is that, in GitLab, wiki is always a separate git repository. For example:
`[I'm a reference-style link][style]`
will point the link to `wikis/style` when the link is inside of a wiki markdown file.
## Images
## Images
Here's our logo (hover to see the title text):
Here's our logo (hover to see the title text):
...
@@ -365,15 +394,15 @@ Some text to show that the reference links can follow later.
...
@@ -365,15 +394,15 @@ Some text to show that the reference links can follow later.
[logo]: assets/logo-white.png
[logo]: assets/logo-white.png
Here's our logo (hover to see the title text):
Here's our logo:
Inline-style:
Inline-style:
![alt text](/assets/logo-white.png "Logo Title Text 1")
![alt text](/assets/logo-white.png)
Reference-style:
Reference-style:
![alt text][logo]
![alt text][logo]
[logo]: /assets/logo-white.png "Logo Title Text 2"