Commit bd518c68 authored by Evan Read's avatar Evan Read

Merge branch 'docs-tilde-codeblocks' into 'master'

Change tilde codeblocks to quad backticks

See merge request gitlab-org/gitlab!26994
parents 74244377 2198f45f
...@@ -122,12 +122,12 @@ our AsciiDoc snippets, wikis and repos using delimited blocks: ...@@ -122,12 +122,12 @@ our AsciiDoc snippets, wikis and repos using delimited blocks:
- **Markdown** - **Markdown**
~~~markdown ````markdown
```plantuml ```plantuml
Bob -> Alice : hello Bob -> Alice : hello
Alice -> Bob : hi Alice -> Bob : hi
``` ```
~~~ ````
- **AsciiDoc** - **AsciiDoc**
......
...@@ -476,7 +476,7 @@ as the list item. This can be done with: ...@@ -476,7 +476,7 @@ as the list item. This can be done with:
Items nested in lists should always align with the first character of the list item. Items nested in lists should always align with the first character of the list item.
In unordered lists (using `-`), this means two spaces for each level of indentation: In unordered lists (using `-`), this means two spaces for each level of indentation:
~~~md ````markdown
- Unordered list item 1 - Unordered list item 1
A line nested using 2 spaces to align with the `U` above. A line nested using 2 spaces to align with the `U` above.
...@@ -495,11 +495,11 @@ In unordered lists (using `-`), this means two spaces for each level of indentat ...@@ -495,11 +495,11 @@ In unordered lists (using `-`), this means two spaces for each level of indentat
- Unordered list item 4 - Unordered list item 4
![an image that will nest inside list item 4](image.png) ![an image that will nest inside list item 4](image.png)
~~~ ````
For ordered lists, use three spaces for each level of indentation: For ordered lists, use three spaces for each level of indentation:
~~~md ````markdown
1. Ordered list item 1 1. Ordered list item 1
A line nested using 3 spaces to align with the `O` above. A line nested using 3 spaces to align with the `O` above.
...@@ -518,7 +518,7 @@ For ordered lists, use three spaces for each level of indentation: ...@@ -518,7 +518,7 @@ For ordered lists, use three spaces for each level of indentation:
1. Ordered list item 4 1. Ordered list item 4
![an image that will nest inside list item 4](image.png) ![an image that will nest inside list item 4](image.png)
~~~ ````
You can nest full lists inside other lists using the same rules as above. If you wish You can nest full lists inside other lists using the same rules as above. If you wish
to mix types, that is also possible, as long as you don't mix items at the same level: to mix types, that is also possible, as long as you don't mix items at the same level:
...@@ -1364,7 +1364,7 @@ on this document. Further explanation is given below. ...@@ -1364,7 +1364,7 @@ on this document. Further explanation is given below.
The following can be used as a template to get started: The following can be used as a template to get started:
~~~md ````markdown
## Descriptive title ## Descriptive title
One or two sentence description of what endpoint does. One or two sentence description of what endpoint does.
...@@ -1392,7 +1392,7 @@ Example response: ...@@ -1392,7 +1392,7 @@ Example response:
} }
] ]
``` ```
~~~ ````
### Fake tokens ### Fake tokens
......
...@@ -282,11 +282,11 @@ source - a listing that is embellished with (colorized) syntax highlighting ...@@ -282,11 +282,11 @@ source - a listing that is embellished with (colorized) syntax highlighting
---- ----
``` ```
~~~asciidoc ````asciidoc
\```language \```language
fenced code - a shorthand syntax for the source block fenced code - a shorthand syntax for the source block
\``` \```
~~~ ````
```asciidoc ```asciidoc
[,attribution,citetitle] [,attribution,citetitle]
......
...@@ -165,7 +165,7 @@ Visit the [official page](https://mermaidjs.github.io/) for more details. If you ...@@ -165,7 +165,7 @@ Visit the [official page](https://mermaidjs.github.io/) for more details. If you
In order to generate a diagram or flowchart, you should write your text inside the `mermaid` block: In order to generate a diagram or flowchart, you should write your text inside the `mermaid` block:
~~~ ````markdown
```mermaid ```mermaid
graph TD; graph TD;
A-->B; A-->B;
...@@ -173,7 +173,7 @@ graph TD; ...@@ -173,7 +173,7 @@ graph TD;
B-->D; B-->D;
C-->D; C-->D;
``` ```
~~~ ````
```mermaid ```mermaid
graph TD; graph TD;
...@@ -185,7 +185,7 @@ graph TD; ...@@ -185,7 +185,7 @@ graph TD;
Subgraphs can also be included: Subgraphs can also be included:
~~~ ````markdown
```mermaid ```mermaid
graph TB graph TB
...@@ -202,7 +202,7 @@ graph TB ...@@ -202,7 +202,7 @@ graph TB
SubGraph1 --> FinalThing[Final Thing] SubGraph1 --> FinalThing[Final Thing]
end end
``` ```
~~~ ````
```mermaid ```mermaid
graph TB graph TB
...@@ -280,27 +280,27 @@ The following delimiters are supported: ...@@ -280,27 +280,27 @@ The following delimiters are supported:
- YAML (`---`): - YAML (`---`):
~~~yaml ```yaml
--- ---
title: About Front Matter title: About Front Matter
example: example:
language: yaml language: yaml
--- ---
~~~ ```
- TOML (`+++`): - TOML (`+++`):
~~~toml ```toml
+++ +++
title = "About Front Matter" title = "About Front Matter"
[example] [example]
language = "toml" language = "toml"
+++ +++
~~~ ```
- JSON (`;;;`): - JSON (`;;;`):
~~~json ```json
;;; ;;;
{ {
"title": "About Front Matter" "title": "About Front Matter"
...@@ -309,7 +309,7 @@ The following delimiters are supported: ...@@ -309,7 +309,7 @@ The following delimiters are supported:
} }
} }
;;; ;;;
~~~ ```
Other languages are supported by adding a specifier to any of the existing Other languages are supported by adding a specifier to any of the existing
delimiters. For example: delimiters. For example:
...@@ -364,7 +364,7 @@ Math written between dollar signs `$` will be rendered inline with the text. Mat ...@@ -364,7 +364,7 @@ Math written between dollar signs `$` will be rendered inline with the text. Mat
inside a [code block](#code-spans-and-blocks) with the language declared as `math`, will be rendered inside a [code block](#code-spans-and-blocks) with the language declared as `math`, will be rendered
on a separate line: on a separate line:
~~~ ````markdown
This math is inline $`a^2+b^2=c^2`$. This math is inline $`a^2+b^2=c^2`$.
This is on a separate line This is on a separate line
...@@ -372,7 +372,7 @@ This is on a separate line ...@@ -372,7 +372,7 @@ This is on a separate line
```math ```math
a^2+b^2=c^2 a^2+b^2=c^2
``` ```
~~~ ````
This math is inline $`a^2+b^2=c^2`$. This math is inline $`a^2+b^2=c^2`$.
...@@ -613,12 +613,12 @@ Inline `code` has `back-ticks around` it. ...@@ -613,12 +613,12 @@ Inline `code` has `back-ticks around` it.
--- ---
Similarly, a whole block of code can be fenced with triple backticks ```` ``` ````, Similarly, a whole block of code can be fenced with triple backticks (```` ``` ````),
triple tildes (`~~~`), or indented 4 or more spaces to achieve a similar effect for triple tildes (`~~~`), or indented 4 or more spaces to achieve a similar effect for
a larger body of code. a larger body of code.
~~~ ````markdown
``` ```python
def function(): def function():
#indenting works just fine in the fenced code block #indenting works just fine in the fenced code block
s = "Python code" s = "Python code"
...@@ -628,7 +628,7 @@ def function(): ...@@ -628,7 +628,7 @@ def function():
Using 4 spaces Using 4 spaces
is like using is like using
3-backtick fences. 3-backtick fences.
~~~ ````
```plaintext ```plaintext
~~~ ~~~
...@@ -651,9 +651,9 @@ is like using ...@@ -651,9 +651,9 @@ is like using
3-backtick fences. 3-backtick fences.
``` ```
~~~plaintext ```plaintext
Tildes are OK too. Tildes are OK too.
~~~ ```
#### Colored code and syntax highlighting #### Colored code and syntax highlighting
...@@ -665,10 +665,10 @@ highlighting in code blocks. For a list of supported languages visit the ...@@ -665,10 +665,10 @@ highlighting in code blocks. For a list of supported languages visit the
Syntax highlighting is only supported in code blocks, it is not possible to highlight Syntax highlighting is only supported in code blocks, it is not possible to highlight
code when it is inline. code when it is inline.
Blocks of code are fenced by lines with three back-ticks ```` ``` ```` or three tildes `~~~`, and have Blocks of code are fenced by lines with three back-ticks (```` ``` ````) or three tildes (`~~~`), and have
the language identified at the end of the first fence: the language identified at the end of the first fence:
~~~markdown ````markdown
```javascript ```javascript
var s = "JavaScript syntax highlighting"; var s = "JavaScript syntax highlighting";
alert(s); alert(s);
...@@ -692,7 +692,7 @@ No language indicated, so no syntax highlighting. ...@@ -692,7 +692,7 @@ No language indicated, so no syntax highlighting.
s = "There is no highlighting for this." s = "There is no highlighting for this."
But let's throw in a <b>tag</b>. But let's throw in a <b>tag</b>.
``` ```
~~~ ````
The four examples above render as: The four examples above render as:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment