Markdown (Github Flavored)

Markdown est un langage de balisage (markup langage en anglais). Un peu à la manière du HTML, il permet de formatter le texte via un système d’annotations. Le Markdown se veut facile à lire, y compris dans sa version texte, et il est donc plus instinctif à apprendre. Il est souvent supporté par les systèmes de commentaires, chats et forums.

Exemple de syntaxe Markdown :

# Titre

Du *texte en italique*, **en gras**.

* Une liste
* d'items

``` js
function hello() {
  alert("Hello");
}
```

En général, un fichier Markdown a l’extension .md ou .markdown.

Il existe différents parser Markdown, chacun apportant quelques nuances et fonctionnalités différentes. Par exemple, certains parser acceptent les tags HTML, implémentent les tables, les attributs de bloc (classe, id, etc).

La syntaxe décrite ci-dessous est la syntaxe supportée par Github, dite Github Flavored Markdown (GFM). Le parser utilisé par Github est CommonMark. Voir les specs. Voir fichier test


Titre

            Avant                        Après           
# h1 Heading

h1 Heading

## h2 Heading

h2 Heading

### h3 Heading

h3 Heading

#### h4 Heading

h4 Heading

##### h5 Heading
h5 Heading
###### h6 Heading
h6 Heading
This is an H1
=============

This is an H1

This is an H2
-------------

This is an H2


Texte

La syntaxe Markdown de formattage de texte n’est pas interprétée à l’intérieur d’un pre.
Pour formatter du texte à l’intérieur d’un pre, utiliser des balises HTML.

En dehors d’un pre

            Avant                        Après           
**This is bold text**This is bold text
__This is bold text__This is bold text
*This is italic text*This is italic text
_This is italic text_This is italic text
~~Strikethrough~~Strikethrough
\*Literal asterisks\**Literal asterisks*

Dedans ou en dehors d’un pre

            Avant                        Après           
<strong>This is bold text</del>This is bold text
<em>This is italic text</em>This is italic text
<del>Strikethrough</del>Strikethrough
<s>Strikethrough</s>Strikethrough
<ins>Underline</ins>Underline
Indice <sub>sub</sub>Indice sub
Exposant <sup>sup</sup>Exposant sup
&copy;©
&#10148;

Retours à la ligne

            Avant                        Après           

Les retours à la ligne en fin de ligne
sont ignorés

Les retours à la ligne en fin de ligne sont ignorés

Ajouter deux espaces à la fin  
Pour préserver le retour à la ligne

Ajouter deux espaces à la fin
Pour préserver le retour à la ligne

Ou séparer les lignes

D'une ligne vide

Ou séparer les lignes

D'une ligne vide


Code

            Avant                        Après           
Inline <code>code</code> Inline code
Inline `code` Inline code
    Non interpreted <i>block code (4 spaces)</i>
Non interpreted <i>block code</i>
<pre>
Interpreted <i>block code</i>
</pre>
Interpreted block code
```
Non interpreted <i>block code</i>
```
Non interpreted <i>block code</i>
<pre lang="diff">
diff --git a/filea.extension b/fileb.extension
index d28nd309d..b3nu834uj 111111
--- a/filea.extension
+++ b/fileb.extension
@@ -1,6 +1,6 @@
-oldLine
+newLine
</pre>
diff --git a/filea.extension b/fileb.extension
index d28nd309d..b3nu834uj 111111
--- a/filea.extension
+++ b/fileb.extension
@@ -1,6 +1,6 @@
-oldLine
+newLine
``` js
var foo = function (bar) {
return bar++;
};
```
var foo = function (bar) {
  return bar++;
};
<kbd>Ctrl</kbd> + <kbd>S</kbd> Ctrl + S

Blockquote

            Avant                        Après           
> Blockquote
Still blockquote  
Again
>> sub-blockquote
> > > sub-sub blockquote.

Blockquote Still blockquote
Again

sub-blockquote

sub-sub blockquote


Image

Syntaxe interprétée à l’intérieur d’un pre

            Avant                        Après           
![Alt](h​ttps://placehold.it/50x50) Alt
![Alt](h​ttps://placehold.it/50x50 “title”) Alt
![Alt][id_img]
[id_img]: h​ttps://placehold.it/50x50
Alt

Lien

Syntaxe interprétée à l’intérieur d’un pre

            Avant                        Après           
h​ttp://google.com http://google.com
[Text](h​ttp://google.com) Text
[Text](h​ttp://google.com “title”) Text
[Text][id_link]
[id_link]: h​ttp://google.com “optional title”
Text
h&#8203;ttp://google.com h​ttp://google.com

Liste

À puce

            Avant                        Après           
* Item 1
With content
* Item 2 (2 spaces)  
With content
+ Item 1
+ Item 2
- Item 1
- Item 2

  • Item 1 With content
  • Item 2 (2 spaces)
    With content
  • Item 1
  • Item 2
  • Item 1
  • Item 2

Énumérée

            Avant                        Après           
1. Item 1
2. Item 2
3. Item 3
   * Item 3a
   * Item 3b
1. Item 4
   The number doesn't really matter
1. Item 5
2. Item 6
2. Item 7
  1. Item 1
  2. Item 2
  3. Item 3
    • Item 3a
    • Item 3b
  4. Item 4 The number doesn't really matter
  5. Item 5
  6. Item 6
  7. Item 7

De todos

            Avant                        Après           
- [x] This is a complete item
- [ ] This is an incomplete item

- [x] This is a complete item - [ ] This is an incomplete item

Séparer deux listes

            Avant                        Après           
1. Item 1

1. Item 2

<!-- -->

1. Une autre liste !

  1. Item 1

  2. Item 2

  1. Une autre liste !



Texte autour

            Avant                        Après           
du texte avant
1. Item 1
du texte après

du texte avant

  1. Item 1 du texte après
du texte avant
* Item 1
du texte après

du texte avant

  • Item 1 du texte après

Délimiteur (horizontal rule)

            Avant                        Après           
___
---
***

Table

            Avant                        Après           
| Default | Align left | Align center | Align right |
| ---     | :---       |     :---:    |        ---: |
| A       | B          | C            | E           |
| F \| G  | H          | I            | J           |
Default is left Left-aligned Center-aligned Right-aligned
A B C E
F | G H I J

Emojis

            Avant                        Après           
:​sparkles: :​camel: :​boom: :sparkles: :camel: :boom:

Liste complète des emojis : http://www.emoji-cheat-sheet.com/ (Github)


Bloc Details

<details>
<summary>Click here to expand.</summary>
<br>
The content of the div
</details>
Click here to expand.
The content of the div