Commit 0fc21fff authored by Amy Qualls's avatar Amy Qualls Committed by Craig Norris

Revisions to Create pages

Word and line edits for Create pages, to bring down the number of
Vale warnings.
parent 543f7ed1
...@@ -13,7 +13,8 @@ You can change the default maximum number of projects that users can create in t ...@@ -13,7 +13,8 @@ You can change the default maximum number of projects that users can create in t
Navigate to **Admin Area > Settings > General**, then expand **Account and Limit**. Navigate to **Admin Area > Settings > General**, then expand **Account and Limit**.
You can increase or decrease that `Default projects limit` value. You can increase or decrease that `Default projects limit` value.
- If you set `Default projects limit` to 0, users are not allowed to create projects in their users personal namespace. However, projects can still be created within a group. - If you set `Default projects limit` to 0, users are not allowed to create projects
in their users personal namespace. However, projects can still be created in a group.
## Max attachment size ## Max attachment size
...@@ -22,8 +23,8 @@ Navigate to **Admin Area > Settings > General**, then expand **Account and Limit ...@@ -22,8 +23,8 @@ Navigate to **Admin Area > Settings > General**, then expand **Account and Limit
From here, you can increase or decrease by changing the value in `Maximum attachment size (MB)`. From here, you can increase or decrease by changing the value in `Maximum attachment size (MB)`.
NOTE: NOTE:
If you choose a size larger than what is currently configured for the web server, If you choose a size larger than the configured value for the web server,
you will likely get errors. See the [troubleshooting section](#troubleshooting) for more you may receive errors. See the [troubleshooting section](#troubleshooting) for more
details. details.
## Max push size ## Max push size
...@@ -39,8 +40,8 @@ Navigate to **Admin Area > Settings > General**, then expand **Account and Limit ...@@ -39,8 +40,8 @@ Navigate to **Admin Area > Settings > General**, then expand **Account and Limit
From here, you can increase or decrease by changing the value in `Maximum import size (MB)`. From here, you can increase or decrease by changing the value in `Maximum import size (MB)`.
NOTE: NOTE:
If you choose a size larger than what is currently configured for the web server, If you choose a size larger than the configured value for the web server,
you will likely get errors. See the [troubleshooting section](#troubleshooting) for more you may receive errors. See the [troubleshooting section](#troubleshooting) for more
details. details.
## Personal Access Token prefix ## Personal Access Token prefix
...@@ -64,12 +65,9 @@ using the `personal_access_token_prefix` field. ...@@ -64,12 +65,9 @@ using the `personal_access_token_prefix` field.
## Repository size limit **(STARTER ONLY)** ## Repository size limit **(STARTER ONLY)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/740) in [GitLab Enterprise Edition 8.12](https://about.gitlab.com/releases/2016/09/22/gitlab-8-12-released/#limit-project-size-ee). Repositories in your GitLab instance can grow quickly, especially if you are
Repositories within your GitLab instance can grow quickly, especially if you are
using LFS. Their size can grow exponentially, rapidly consuming available storage. using LFS. Their size can grow exponentially, rapidly consuming available storage.
To prevent this from happening, you can set a hard limit for your repositories' size.
To avoid this from happening, you can set a hard limit for your repositories' size.
This limit can be set globally, per group, or per project, with per project limits This limit can be set globally, per group, or per project, with per project limits
taking the highest priority. taking the highest priority.
...@@ -88,7 +86,7 @@ For instance, consider the following workflow: ...@@ -88,7 +86,7 @@ For instance, consider the following workflow:
Only a GitLab administrator can set those limits. Setting the limit to `0` means Only a GitLab administrator can set those limits. Setting the limit to `0` means
there are no restrictions. there are no restrictions.
These settings can be found within: These settings can be found in:
- Each project's settings: - Each project's settings:
1. From the Project's homepage, navigate to **Settings > General**. 1. From the Project's homepage, navigate to **Settings > General**.
...@@ -104,9 +102,9 @@ These settings can be found within: ...@@ -104,9 +102,9 @@ These settings can be found within:
1. Fill in the **Size limit per repository (MB)** field. 1. Fill in the **Size limit per repository (MB)** field.
1. Click **Save changes**. 1. Click **Save changes**.
The first push of a new project, including LFS objects, will be checked for size The first push of a new project, including LFS objects, is checked for size.
and **will** be rejected if the sum of their sizes exceeds the maximum allowed If the sum of their sizes exceeds the maximum allowed repository size, the push
repository size. is rejected.
NOTE: NOTE:
The repository size limit includes repository files and LFS, but does not include artifacts, uploads, The repository size limit includes repository files and LFS, but does not include artifacts, uploads,
...@@ -121,12 +119,12 @@ For GitLab.com repository size limits, see [accounts and limit settings](../../g ...@@ -121,12 +119,12 @@ For GitLab.com repository size limits, see [accounts and limit settings](../../g
### 413 Request Entity Too Large ### 413 Request Entity Too Large
If you are attaching a file to a comment or reply in GitLab and receive the `413 Request Entity Too Large` When attaching a file to a comment or reply in GitLab displays a `413 Request Entity Too Large`
error, it is likely caused by having a [max attachment size](#max-attachment-size) error, the [max attachment size](#max-attachment-size)
larger than what the web server is configured to allow. is probably larger than the web server's allowed value.
If you wanted to increase the max attachment size to 200m in a GitLab To increase the max attachment size to 200 MB in a
[Omnibus](https://docs.gitlab.com/omnibus/) install, for example, you might need to [Omnibus GitLab](https://docs.gitlab.com/omnibus/) install, you may need to
add the line below to `/etc/gitlab/gitlab.rb` before increasing the max attachment size: add the line below to `/etc/gitlab/gitlab.rb` before increasing the max attachment size:
```ruby ```ruby
...@@ -135,15 +133,15 @@ nginx['client_max_body_size'] = "200m" ...@@ -135,15 +133,15 @@ nginx['client_max_body_size'] = "200m"
## Limiting lifetime of personal access tokens **(ULTIMATE SELF)** ## Limiting lifetime of personal access tokens **(ULTIMATE SELF)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3649) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3649) in GitLab Ultimate 12.6.
Users can optionally specify an expiration date for Users can optionally specify an expiration date for
[personal access tokens](../../profile/personal_access_tokens.md). [personal access tokens](../../profile/personal_access_tokens.md).
This expiration date is not a requirement, and can be set to any arbitrary date. This expiration date is not a requirement, and can be set to any arbitrary date.
Since personal access tokens are the only token needed for programmatic access to GitLab, Personal access tokens are the only tokens needed for programmatic access to GitLab.
organizations with security requirements may want to enforce more protection to require However, organizations with security requirements may want to enforce more protection by
regular rotation of these tokens. requiring the regular rotation of these tokens.
### Setting a limit ### Setting a limit
...@@ -164,10 +162,10 @@ Once a lifetime for personal access tokens is set, GitLab will: ...@@ -164,10 +162,10 @@ Once a lifetime for personal access tokens is set, GitLab will:
- After three hours, revoke old tokens with no expiration date or with a lifetime longer than the - After three hours, revoke old tokens with no expiration date or with a lifetime longer than the
allowed lifetime. Three hours is given to allow administrators to change the allowed lifetime, allowed lifetime. Three hours is given to allow administrators to change the allowed lifetime,
or remove it, before revocation takes place. or remove it, before revocation takes place.
## Enforcement of SSH key expiration **(ULTIMATE ONLY)** ## Enforcement of SSH key expiration **(ULTIMATE ONLY)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276221) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.9. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276221) in GitLab Ultimate 13.9.
> - It is deployed behind a feature flag, disabled by default. > - It is deployed behind a feature flag, disabled by default.
> - It is disabled on GitLab.com. > - It is disabled on GitLab.com.
> - It is not recommended for production use. > - It is not recommended for production use.
...@@ -201,13 +199,14 @@ Feature.disable(:ff_enforce_ssh_key_expiration) ...@@ -201,13 +199,14 @@ Feature.disable(:ff_enforce_ssh_key_expiration)
## Optional enforcement of Personal Access Token expiry **(ULTIMATE SELF)** ## Optional enforcement of Personal Access Token expiry **(ULTIMATE SELF)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214723) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.1. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214723) in GitLab Ultimate 13.1.
> - It is deployed behind a feature flag, disabled by default. > - It is deployed behind a feature flag, disabled by default.
> - It is disabled on GitLab.com. > - It is disabled on GitLab.com.
> - It is not recommended for production use. > - It is not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-optional-enforcement-of-personal-access-token-expiry-feature). **(FREE SELF)** > - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-optional-enforcement-of-personal-access-token-expiry-feature). **(FREE SELF)**
GitLab administrators can choose to prevent personal access tokens from expiring automatically. The tokens will be usable after the expiry date, unless they are revoked explicitly. GitLab administrators can choose to prevent personal access tokens from expiring
automatically. The tokens are usable after the expiry date, unless they are revoked explicitly.
To do this: To do this:
...@@ -244,4 +243,6 @@ To do this: ...@@ -244,4 +243,6 @@ To do this:
1. Check the **Prevent users from changing their profile name** checkbox. 1. Check the **Prevent users from changing their profile name** checkbox.
NOTE: NOTE:
When this ability is disabled, GitLab administrators will still be able to update the name of any user in their instance via the [Admin UI](../index.md#administering-users) or the [API](../../../api/users.md#user-modification) When this ability is disabled, GitLab administrators can still use the
[Admin UI](../index.md#administering-users) or the
[API](../../../api/users.md#user-modification) to update usernames.
...@@ -11,14 +11,14 @@ GitLab allows administrators to enforce specific controls. ...@@ -11,14 +11,14 @@ GitLab allows administrators to enforce specific controls.
To access the visibility and access control options: To access the visibility and access control options:
1. Log in to GitLab as an admin. 1. Sign in to GitLab as a user with Administrator [permissions](../../permissions.md).
1. Go to **Admin Area > Settings > General**. 1. Go to **Admin Area > Settings > General**.
1. Expand the **Visibility and access controls** section. 1. Expand the **Visibility and access controls** section.
## Default branch protection ## Default branch protection
This global option defines the branch protection that applies to every repository's default branch. [Branch protection](../../project/protected_branches.md) specifies which roles can push to branches and which roles can delete This global option defines the branch protection that applies to every repository's default branch. [Branch protection](../../project/protected_branches.md) specifies which roles can push to branches and which roles can delete
branches. In this case _Default_ refers to a repository's default branch, which in most cases is _master_. branches. In this case _Default_ refers to a repository's default branch, which in most cases is `master`.
This setting applies only to each repositories' default branch. To protect other branches, you must configure branch protection in repository. For details, see [Protected Branches](../../project/protected_branches.md). This setting applies only to each repositories' default branch. To protect other branches, you must configure branch protection in repository. For details, see [Protected Branches](../../project/protected_branches.md).
...@@ -62,7 +62,7 @@ For more details, see [Default project-creation level](../../group/index.md#defa ...@@ -62,7 +62,7 @@ For more details, see [Default project-creation level](../../group/index.md#defa
By default, a project can be deleted by anyone with the **Owner** role, either at the project or By default, a project can be deleted by anyone with the **Owner** role, either at the project or
group level. group level.
To ensure only admin users can delete projects: To ensure only Administrator users can delete projects:
1. Check the **Default project deletion protection** checkbox. 1. Check the **Default project deletion protection** checkbox.
1. Click **Save changes**. 1. Click **Save changes**.
...@@ -71,16 +71,16 @@ To ensure only admin users can delete projects: ...@@ -71,16 +71,16 @@ To ensure only admin users can delete projects:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6.
By default, a project marked for deletion will be permanently removed with immediate effect. By default, a project marked for deletion is permanently removed with immediate effect.
By default, a group marked for deletion will be permanently removed after 7 days. By default, a group marked for deletion is permanently removed after seven days.
WARNING: WARNING:
The default behavior of [Delayed Project deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6 was changed to The default behavior of [Delayed Project deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) in GitLab 12.6 was changed to
[Immediate deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/220382) in GitLab 13.2. [Immediate deletion](https://gitlab.com/gitlab-org/gitlab/-/issues/220382) in GitLab 13.2.
Projects within a group (but not a personal namespace) can be deleted after a delayed period, by [configuring in Group Settings](../../group/index.md#enabling-delayed-project-removal). Projects in a group (but not a personal namespace) can be deleted after a delayed period, by
[configuring in Group Settings](../../group/index.md#enabling-delayed-project-removal).
The default period is 7 days, and can be changed. Setting this period to 0 will enable immediate removal The default period is seven days, and can be changed. Setting this period to `0` enables immediate removal
of projects or groups. of projects or groups.
To change this period: To change this period:
...@@ -149,13 +149,11 @@ For more details, see [Exporting a project and its data](../../../user/project/s ...@@ -149,13 +149,11 @@ For more details, see [Exporting a project and its data](../../../user/project/s
## Enabled Git access protocols ## Enabled Git access protocols
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4696) in GitLab 8.10.
With GitLab access restrictions, you can select with which protocols users can communicate with With GitLab access restrictions, you can select with which protocols users can communicate with
GitLab. GitLab.
Disabling an access protocol does not block access to the server itself via those ports. The ports Disabling an access protocol does not block access to the server itself by using those ports. The ports
used for the protocol, SSH or HTTP(S), will still be accessible. The GitLab restrictions apply at the used for the protocol, SSH or HTTP(S), are still accessible. The GitLab restrictions apply at the
application level. application level.
To specify the enabled Git access protocols: To specify the enabled Git access protocols:
...@@ -170,26 +168,26 @@ When both SSH and HTTP(S) are enabled, users can choose either protocol. ...@@ -170,26 +168,26 @@ When both SSH and HTTP(S) are enabled, users can choose either protocol.
When only one protocol is enabled: When only one protocol is enabled:
- The project page will only show the allowed protocol's URL, with no option to - The project page shows only the allowed protocol's URL, with no option to
change it. change it.
- A tooltip will be shown when you hover over the URL's protocol, if an action - A tooltip is shown when you hover over the URL's protocol, if an action
on the user's part is required, e.g. adding an SSH key, or setting a password. on the user's part is required. For example, adding an SSH key or setting a password.
![Project URL with SSH only access](img/restricted_url.png) ![Project URL with SSH only access](img/restricted_url.png)
On top of these UI restrictions, GitLab will deny all Git actions on the protocol On top of these UI restrictions, GitLab denies all Git actions on the protocol
not selected. not selected.
WARNING: WARNING:
Starting with [GitLab 10.7](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/18021), GitLab versions [10.7 and later](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/18021),
HTTP(S) protocol will be allowed for Git clone or fetch requests done by GitLab Runner allow the HTTP(S) protocol for Git clone or fetch requests done by GitLab Runner
from CI/CD jobs, even if _Only SSH_ was selected. from CI/CD jobs, even if **Only SSH** was selected.
## Custom Git clone URL for HTTP(S) ## Custom Git clone URL for HTTP(S)
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18422) in GitLab 12.4. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18422) in GitLab 12.4.
You can customize project Git clone URLs for HTTP(S). This will affect the clone You can customize project Git clone URLs for HTTP(S), which affects the clone
panel: panel:
![Clone panel](img/clone_panel_v12_4.png) ![Clone panel](img/clone_panel_v12_4.png)
...@@ -225,10 +223,9 @@ For more details, see [SSH key restrictions](../../../security/ssh_keys_restrict ...@@ -225,10 +223,9 @@ For more details, see [SSH key restrictions](../../../security/ssh_keys_restrict
## Allow mirrors to be set up for projects ## Allow mirrors to be set up for projects
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3586) in GitLab 10.3. This option is enabled by default. By disabling it, both
[pull and push mirroring](../../project/repository/repository_mirroring.md) no longer
This option is enabled by default. By disabling it, both [pull and push mirroring](../../project/repository/repository_mirroring.md) will no longer work in every repository. They can only be re-enabled by an administrator user on a per-project basis.
work in every repository and can only be re-enabled by an admin on a per-project basis.
![Mirror settings](img/mirror_settings.png) ![Mirror settings](img/mirror_settings.png)
......
...@@ -21,7 +21,7 @@ We encourage you to view this document as [rendered by GitLab itself](https://gi ...@@ -21,7 +21,7 @@ We encourage you to view this document as [rendered by GitLab itself](https://gi
## GitLab Flavored Markdown (GFM) ## GitLab Flavored Markdown (GFM)
GitLab uses "GitLab Flavored Markdown" (GFM). It extends the [CommonMark specification](https://spec.commonmark.org/current/) GitLab uses "GitLab Flavored Markdown" (GFM). It extends the [CommonMark specification](https://spec.commonmark.org/current/)
(which is based on standard Markdown) in several ways to add additional useful functionality. (which is based on standard Markdown) in several ways to add more features.
It was inspired by [GitHub Flavored Markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/basic-writing-and-formatting-syntax). It was inspired by [GitHub Flavored Markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/basic-writing-and-formatting-syntax).
You can use GFM in the following areas: You can use GFM in the following areas:
...@@ -41,20 +41,23 @@ for more information. ...@@ -41,20 +41,23 @@ for more information.
### Transition from Redcarpet to CommonMark ### Transition from Redcarpet to CommonMark
Since 11.1, GitLab uses the [CommonMark Ruby Library](https://github.com/gjtorikian/commonmarker) - In GitLab version 11.8, the [Redcarpet Ruby library](https://github.com/vmg/redcarpet)
for Markdown processing of all new issues, merge requests, comments, and other Markdown was removed. All issues and comments, including those from pre-11.1, are now processed
content in the GitLab system. Since 11.3, wiki pages and Markdown files (`*.md`) in using the [CommonMark Ruby Library](https://github.com/gjtorikian/commonmarker).
repositories are also processed with CommonMark. As of 11.8, the [Redcarpet Ruby library](https://github.com/vmg/redcarpet) - GitLab versions 11.3 and greater use CommonMark to process wiki pages and Markdown
has been removed and all issues and comments, including those from pre-11.1, are now processed files (`*.md`) in repositories.
using the [CommonMark Ruby Library](https://github.com/gjtorikian/commonmarker). - GitLab versions 11.1 and greater use the [CommonMark Ruby Library](https://github.com/gjtorikian/commonmarker)
for Markdown processing of all new issues, merge requests, comments, and other Markdown
The documentation website had its [Markdown engine migrated from Redcarpet to Kramdown](https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/108) content in the GitLab system.
The documentation website migrated its Markdown engine
[from Redcarpet to Kramdown](https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/108)
in October 2018. in October 2018.
You may have older issues, merge requests, or Markdown documents in your You may have older issues, merge requests, or Markdown documents in your
repository that were written using some of the nuances of the GitLab RedCarpet version repository that relied upon nuances of the GitLab RedCarpet version
of Markdown. Since CommonMark uses slightly stricter syntax, these documents of Markdown. Because CommonMark uses slightly stricter syntax, these documents
might now appear a little differently since we have transitioned to CommonMark. may now appear differently after the transition to CommonMark.
For example, numbered lists with nested lists may For example, numbered lists with nested lists may
render incorrectly: render incorrectly:
...@@ -80,23 +83,24 @@ character of the top list item (`C` in this case): ...@@ -80,23 +83,24 @@ character of the top list item (`C` in this case):
We flag any significant differences between Redcarpet and CommonMark Markdown in this document. We flag any significant differences between Redcarpet and CommonMark Markdown in this document.
If you have a large volume of Markdown files, it can be tedious to determine If you have many Markdown files, it can be tedious to determine
if they display correctly or not. You can use the if they display correctly or not. You can use the
[`diff_redcarpet_cmark`](https://gitlab.com/digitalmoksha/diff_redcarpet_cmark) [`diff_redcarpet_cmark`](https://gitlab.com/digitalmoksha/diff_redcarpet_cmark)
tool (not an officially supported product) to generate a list of files and the tool to generate a list of files and the
differences between how RedCarpet and CommonMark render the files. It gives differences between how RedCarpet and CommonMark render the files. It indicates
an indication if anything needs to be changed - often nothing needs if any changes are needed.
to change.
`diff_redcarpet_cmark` is not an officially supported product.
### GFM extends standard Markdown ### GFM extends standard Markdown
GitLab makes full use of the standard (CommonMark) formatting, but also includes additional GitLab makes full use of the standard (CommonMark) formatting, but also includes more
functionality useful for GitLab users. helpful features for GitLab users.
It makes use of [new Markdown features](#new-gfm-markdown-extensions), It makes use of [new Markdown features](#new-gfm-markdown-extensions),
not found in standard Markdown: not found in standard Markdown:
- [Color "chips" written in HEX, RGB or HSL](#colors) - [Color chips written in HEX, RGB or HSL](#colors)
- [Diagrams and flowcharts](#diagrams-and-flowcharts) - [Diagrams and flowcharts](#diagrams-and-flowcharts)
- [Emoji](#emoji) - [Emoji](#emoji)
- [Front matter](#front-matter) - [Front matter](#front-matter)
...@@ -124,7 +128,7 @@ changing how standard Markdown is used: ...@@ -124,7 +128,7 @@ changing how standard Markdown is used:
### Colors ### Colors
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#colors). If this section isn't rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#colors).
It's possible to have color written in HEX, RGB, or HSL format rendered with a color It's possible to have color written in HEX, RGB, or HSL format rendered with a color
indicator. indicator.
...@@ -168,9 +172,12 @@ It's also possible to use [Kroki](https://kroki.io) to create a wide variety of ...@@ -168,9 +172,12 @@ It's also possible to use [Kroki](https://kroki.io) to create a wide variety of
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/15107) in GitLab 10.3. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/15107) in GitLab 10.3.
Visit the [official page](https://mermaidjs.github.io/) for more details. If you're new to using Mermaid or need help identifying issues in your Mermaid code, the [Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) is a helpful tool for creating and resolving issues within Mermaid diagrams. Visit the [official page](https://mermaidjs.github.io/) for more details. The
[Mermaid Live Editor](https://mermaid-js.github.io/mermaid-live-editor/) helps you
learn Mermaid and debug issues in your Mermaid code. Use it to identify and resolve
issues in your diagrams.
In order to generate a diagram or flowchart, you should write your text inside the `mermaid` block: To generate a diagram or flowchart, write your text inside the `mermaid` block:
````markdown ````markdown
```mermaid ```mermaid
...@@ -239,14 +246,14 @@ Read more in the [Kroki integration](../administration/integration/kroki.md) pag ...@@ -239,14 +246,14 @@ Read more in the [Kroki integration](../administration/integration/kroki.md) pag
### Emoji ### Emoji
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#emoji). If this section isn't rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#emoji).
```markdown ```markdown
Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you: Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you:
:zap: You can use emoji anywhere GFM is supported. :v: :zap: You can use emoji anywhere GFM is supported. :v:
You can use it to point out a :bug: or warn about :speak_no_evil: patches. And if someone improves your really :snail: code, send them some :birthday:. People will :heart: you for that. You can use it to point out a :bug: or warn about :speak_no_evil: patches. And if someone improves your really :snail: code, send them some :birthday:. People :heart: you for that.
If you're new to this, don't be :fearful:. You can join the emoji :family:. All you need to do is to look up one of the supported codes. If you're new to this, don't be :fearful:. You can join the emoji :family:. All you need to do is to look up one of the supported codes.
...@@ -257,7 +264,7 @@ Sometimes you want to <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/ma ...@@ -257,7 +264,7 @@ Sometimes you want to <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/ma
<img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/zap.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">You can use emoji anywhere GFM is supported. <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/v.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/zap.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">You can use emoji anywhere GFM is supported. <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/v.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">
You can use it to point out a <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/bug.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> or warn about <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/speak_no_evil.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> patches. And if someone improves your really <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/snail.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> code, send them some <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/birthday.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">. People will <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/heart.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> you for that. You can use it to point out a<img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/bug.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> or warn about <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/speak_no_evil.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> patches. If someone improves your really <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/snail.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> code, send them some <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/birthday.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">. People <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/heart.png" width="20px" height="20px" style="display:inline;margin:0;border: 0"> you for that.
If you're new to this, don't be <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/fearful.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">. You can join the emoji <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/family.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">. All you need to do is to look up one of the supported codes. If you're new to this, don't be <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/fearful.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">. You can join the emoji <img src="https://gitlab.com/gitlab-org/gitlab-foss/raw/master/app/assets/images/emoji/family.png" width="20px" height="20px" style="display:inline;margin:0;border: 0">. All you need to do is to look up one of the supported codes.
...@@ -265,8 +272,8 @@ Consult the [Emoji Cheat Sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) ...@@ -265,8 +272,8 @@ Consult the [Emoji Cheat Sheet](https://www.webfx.com/tools/emoji-cheat-sheet/)
#### Emoji and your OS #### Emoji and your OS
The emoji example above uses hard-coded images for this documentation. The emoji, The emoji example above uses hard-coded images for this documentation. Rendered emoji
when rendered within GitLab, may appear different depending on the OS and browser used. in GitLab may appear different depending on the OS and browser used.
Most emoji are natively supported on macOS, Windows, iOS, Android, and fall back on image-based Most emoji are natively supported on macOS, Windows, iOS, Android, and fall back on image-based
emoji where there is no support. emoji where there is no support.
...@@ -288,8 +295,9 @@ its content. This data can be used by static site generators such as [Jekyll](ht ...@@ -288,8 +295,9 @@ its content. This data can be used by static site generators such as [Jekyll](ht
[Hugo](https://gohugo.io/content-management/front-matter/), and many other applications. [Hugo](https://gohugo.io/content-management/front-matter/), and many other applications.
When you view a Markdown file rendered by GitLab, any front matter is displayed as-is, When you view a Markdown file rendered by GitLab, any front matter is displayed as-is,
in a box at the top of the document, before the rendered HTML content. To view an example, in a box at the top of the document. The HTML content displays after the front matter. To view an example,
you can toggle between the source and rendered version of a [GitLab documentation file](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/README.md). you can toggle between the source and rendered version of a
[GitLab documentation file](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/README.md).
In GitLab, front matter is only used in Markdown files and wiki pages, not the other In GitLab, front matter is only used in Markdown files and wiki pages, not the other
places where Markdown formatting is supported. It must be at the very top of the document places where Markdown formatting is supported. It must be at the very top of the document
...@@ -344,7 +352,7 @@ $example = array( ...@@ -344,7 +352,7 @@ $example = array(
### Inline diff ### Inline diff
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#inline-diff). If this section isn't rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#inline-diff).
With inline diff tags you can display `{+ additions +}` or `[- deletions -]`. With inline diff tags you can display `{+ additions +}` or `[- deletions -]`.
...@@ -417,7 +425,7 @@ the [Asciidoctor user manual](https://asciidoctor.org/docs/user-manual/#activati ...@@ -417,7 +425,7 @@ the [Asciidoctor user manual](https://asciidoctor.org/docs/user-manual/#activati
### Special GitLab references ### Special GitLab references
GFM recognizes special GitLab related references. For example, you can reference GFM recognizes special GitLab related references. For example, you can reference
an issue, a commit, a team member, or even the whole team within a project. GFM turns an issue, a commit, a team member, or even an entire project team. GFM turns
that reference into a link so you can navigate between them. that reference into a link so you can navigate between them.
Additionally, GFM recognizes certain cross-project references and also has a shorthand Additionally, GFM recognizes certain cross-project references and also has a shorthand
...@@ -425,7 +433,7 @@ version to reference other projects from the same namespace. ...@@ -425,7 +433,7 @@ version to reference other projects from the same namespace.
GFM recognizes the following: GFM recognizes the following:
| references | input | cross-project reference | shortcut within same namespace | | references | input | cross-project reference | shortcut inside same namespace |
| :------------------------------ | :------------------------- | :-------------------------------------- | :----------------------------- | | :------------------------------ | :------------------------- | :-------------------------------------- | :----------------------------- |
| specific user | `@user_name` | | | | specific user | `@user_name` | | |
| specific group | `@group_name` | | | | specific group | `@group_name` | | |
...@@ -451,8 +459,8 @@ GFM recognizes the following: ...@@ -451,8 +459,8 @@ GFM recognizes the following:
1. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222483) in GitLab 13.7. 1. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222483) in GitLab 13.7.
For example, referencing an issue by using `#123` will format the output as a link For example, referencing an issue by using `#123` formats the output as a link
to issue number 123 with text `#123`. Likewise, a link to issue number 123 will be to issue number 123 with text `#123`. Likewise, a link to issue number 123 is
recognized and formatted with text `#123`. recognized and formatted with text `#123`.
In addition to this, links to some objects are also recognized and formatted. Some examples of these are: In addition to this, links to some objects are also recognized and formatted. Some examples of these are:
...@@ -463,12 +471,12 @@ In addition to this, links to some objects are also recognized and formatted. So ...@@ -463,12 +471,12 @@ In addition to this, links to some objects are also recognized and formatted. So
### Task lists ### Task lists
If this section is not rendered correctly, [view it in GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#task-lists). If this section isn't rendered correctly, [view it in GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#task-lists).
You can add task lists anywhere Markdown is supported, but you can only "click" You can add task lists anywhere Markdown is supported, but only issues, merge requests, and
to toggle the boxes if they are in issues, merge requests, or comments. In other comments support clicking to toggle the boxes. In other
places you must edit the Markdown manually to change the status by adding or places, you must edit the Markdown manually to change the status by adding or
removing an `x` within the square brackets. removing an `x` inside the square brackets.
To create a task list, add a specially-formatted Markdown list. You can use either To create a task list, add a specially-formatted Markdown list. You can use either
unordered or ordered lists: unordered or ordered lists:
...@@ -486,13 +494,13 @@ unordered or ordered lists: ...@@ -486,13 +494,13 @@ unordered or ordered lists:
1. [x] Sub-task 2 1. [x] Sub-task 2
``` ```
![A task list as rendered by the GitLab interface](img/completed_tasks_v13_3.png) ![Task list as rendered by the GitLab interface](img/completed_tasks_v13_3.png)
### Table of contents ### Table of contents
You can add a table of contents to a Markdown file, wiki page, or issue/merge request Add a table of contents to a Markdown file, wiki page, issue request, or merge request
description, by adding the tag `[[_TOC_]]` on its own line. description by adding the tag `[[_TOC_]]` on its own line.
It appears as an unordered list that links to the various headers. It displays an unordered list that links to subheadings in the document.
```markdown ```markdown
This is an intro sentence to my Wiki page. This is an intro sentence to my Wiki page.
...@@ -508,7 +516,7 @@ First section content. ...@@ -508,7 +516,7 @@ First section content.
Second section content. Second section content.
``` ```
![Preview of an auto-generated TOC in a Wiki](img/markdown_toc_preview_v12_9.png) ![Preview of an auto-generated table of contents in a Wiki](img/markdown_toc_preview_v12_9.png)
### Wiki-specific Markdown ### Wiki-specific Markdown
...@@ -587,38 +595,39 @@ This snippet links to `<wiki_root>/miscellaneous.md`: ...@@ -587,38 +595,39 @@ This snippet links to `<wiki_root>/miscellaneous.md`:
### Embedding metrics in GitLab Flavored Markdown ### Embedding metrics in GitLab Flavored Markdown
Metric charts can be embedded within GitLab Flavored Markdown. See [Embedding Metrics within GitLab flavored Markdown](../operations/metrics/embed.md) for more details. Metric charts can be embedded in GitLab Flavored Markdown. Read
[Embedding Metrics in GitLab flavored Markdown](../operations/metrics/embed.md) for more details.
## Standard Markdown and extensions in GitLab ## Standard Markdown and extensions in GitLab
All standard Markdown formatting should work as expected within GitLab. Some standard All standard Markdown formatting should work as expected in GitLab. Some standard
functionality is extended with additional features, without affecting the standard usage. functionality is extended with additional features, without affecting the standard usage.
If a functionality is extended, the new option is listed as a sub-section. If a functionality is extended, the new option is listed as a sub-section.
### Blockquotes ### Blockquotes
Blockquotes are useful to highlight information, such as a side-note. It's generated Use a blockquote to highlight information, such as a side note. It's generated
by starting the lines of the blockquote with `>`: by starting the lines of the blockquote with `>`:
```markdown ```markdown
> Blockquotes are very handy to emulate reply text. > Blockquotes help you emulate reply text.
> This line is part of the same quote. > This line is part of the same quote.
Quote break. Quote break.
> This is a very long line that is still quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. > This is a very long line that is still quoted properly when it wraps. Keep writing to make sure this line is long enough to actually wrap for everyone. You can also *add* **Markdown** into a blockquote.
``` ```
> Blockquotes are very handy to emulate reply text. > Blockquotes help you emulate reply text.
> This line is part of the same quote. > This line is part of the same quote.
Quote break. Quote break.
> This is a very long line that is still quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. > This is a very long line that is still quoted properly when it wraps. Keep writing to make sure this line is long enough to actually wrap for everyone. You can also *add* **Markdown** into a blockquote.
#### Multiline blockquote #### Multiline blockquote
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#multiline-blockquote). If this section isn't rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#multiline-blockquote).
GFM extends the standard Markdown by also supporting multi-line blockquotes GFM extends the standard Markdown by also supporting multi-line blockquotes
fenced by `>>>`: fenced by `>>>`:
...@@ -643,9 +652,9 @@ you can quote that without having to manually prepend `>` to every line! ...@@ -643,9 +652,9 @@ you can quote that without having to manually prepend `>` to every line!
### Code spans and blocks ### Code spans and blocks
You can highlight anything that should be viewed as code and not simple text. You can highlight anything that should be viewed as code and not standard text.
Simple inline code is highlighted with single backticks `` ` ``: Inline code is highlighted with single backticks `` ` ``:
```markdown ```markdown
Inline `code` has `back-ticks around` it. Inline `code` has `back-ticks around` it.
...@@ -655,9 +664,11 @@ Inline `code` has `back-ticks around` it. ...@@ -655,9 +664,11 @@ Inline `code` has `back-ticks around` it.
--- ---
Similarly, a whole block of code can be fenced with triple backticks (```` ``` ````), To achieve a similar effect for a larger code example, you can:
triple tildes (`~~~`), or indented 4 or more spaces to achieve a similar effect for
a larger body of code. - Fence an entire block of code with triple backticks (```` ``` ````).
- Fence an entire block of code with triple tildes (`~~~`).
- Indent it four or more spaces.
````markdown ````markdown
```python ```python
...@@ -699,16 +710,16 @@ Tildes are OK too. ...@@ -699,16 +710,16 @@ Tildes are OK too.
#### Colored code and syntax highlighting #### Colored code and syntax highlighting
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#colored-code-and-syntax-highlighting). If this section isn't rendered correctly,
[view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#colored-code-and-syntax-highlighting).
GitLab uses the [Rouge Ruby library](http://rouge.jneen.net/) for more colorful syntax GitLab uses the [Rouge Ruby library](http://rouge.jneen.net/) for more colorful syntax
highlighting in code blocks. For a list of supported languages visit the highlighting in code blocks. For a list of supported languages visit the
[Rouge project wiki](https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers). [Rouge project wiki](https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers).
Syntax highlighting is only supported in code blocks, so it's not possible to highlight Syntax highlighting is supported only in code blocks, so you can't highlight inline code.
code when it's inline.
Blocks of code are fenced by lines with three back-ticks (```` ``` ````) or three tildes (`~~~`), and have To fence and apply syntax highlighting to a block of code, append the code language
the language identified at the end of the first fence: to the opening code declaration, three back-ticks (```` ``` ````) or three tildes (`~~~`):
````markdown ````markdown
```javascript ```javascript
...@@ -765,7 +776,7 @@ But let's throw in a <b>tag</b>. ...@@ -765,7 +776,7 @@ But let's throw in a <b>tag</b>.
### Emphasis ### Emphasis
There are multiple ways to emphasize text in Markdown. You can italicize, bold, strikethrough, There are multiple ways to emphasize text in Markdown. You can italicize, bold, strikethrough,
as well as combine these emphasis styles together. and combine these emphasis styles together.
Strikethrough is not part of the core Markdown standard, but is part of GFM. Strikethrough is not part of the core Markdown standard, but is part of GFM.
Examples: Examples:
...@@ -790,10 +801,11 @@ Strikethrough uses two tildes. ~~Scratch this.~~ ...@@ -790,10 +801,11 @@ Strikethrough uses two tildes. ~~Scratch this.~~
#### Multiple underscores in words and mid-word emphasis #### Multiple underscores in words and mid-word emphasis
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#multiple-underscores-in-words). If this section isn't rendered correctly,
[view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#multiple-underscores-in-words).
It's not usually useful to italicize just _part_ of a word, especially when you're Avoid italicizing a portion of a word, especially when you're
dealing with code and names that often appear with multiple underscores. As a result, dealing with code and names that often appear with multiple underscores.
GFM extends the standard Markdown standard by ignoring multiple underlines in words, GFM extends the standard Markdown standard by ignoring multiple underlines in words,
to allow better rendering of Markdown documents discussing code: to allow better rendering of Markdown documents discussing code:
...@@ -926,8 +938,7 @@ emoji is converted to an image which is then removed from the ID. ...@@ -926,8 +938,7 @@ emoji is converted to an image which is then removed from the ID.
### Horizontal Rule ### Horizontal Rule
It's very simple to create a horizontal rule, by using three or more hyphens, asterisks, Create a horizontal rule by using three or more hyphens, asterisks, or underscores:
or underscores:
```markdown ```markdown
Three or more hyphens, Three or more hyphens,
...@@ -982,7 +993,7 @@ Do not change to a reference style link. ...@@ -982,7 +993,7 @@ Do not change to a reference style link.
#### Videos #### Videos
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#videos). If this section isn't rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#videos).
Image tags that link to files with a video extension are automatically converted to Image tags that link to files with a video extension are automatically converted to
a video player. The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`: a video player. The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`:
...@@ -999,7 +1010,7 @@ Here's a sample video: ...@@ -999,7 +1010,7 @@ Here's a sample video:
#### Audio #### Audio
If this section is not rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#audio). If this section isn't rendered correctly, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#audio).
Similar to videos, link tags for files with an audio extension are automatically converted to Similar to videos, link tags for files with an audio extension are automatically converted to
an audio player. The valid audio extensions are `.mp3`, `.oga`, `.ogg`, `.spx`, and `.wav`: an audio player. The valid audio extensions are `.mp3`, `.oga`, `.ogg`, `.spx`, and `.wav`:
...@@ -1016,7 +1027,8 @@ Here's a sample audio clip: ...@@ -1016,7 +1027,8 @@ Here's a sample audio clip:
### Inline HTML ### Inline HTML
To see the Markdown rendered within HTML in the second example, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#inline-html). To see the second example of Markdown rendered in HTML,
[view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#inline-html).
You can also use raw HTML in your Markdown, and it usually works pretty well. You can also use raw HTML in your Markdown, and it usually works pretty well.
...@@ -1080,11 +1092,12 @@ Markdown is fine in GitLab. ...@@ -1080,11 +1092,12 @@ Markdown is fine in GitLab.
#### Details and summary #### Details and summary
To see the Markdown rendered within HTML in the second example, [view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#details-and-summary). To see the second Markdown example rendered in HTML,
[view it in GitLab](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#details-and-summary).
Content can be collapsed using HTML's [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) Content can be collapsed using HTML's [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)
and [`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary) and [`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary)
tags. This is especially useful for collapsing long logs so they take up less screen space. tags. For example, collapse a long log file so it takes up less screen space.
```html ```html
<p> <p>
...@@ -1112,7 +1125,7 @@ These details <em>remain</em> <strong>hidden</strong> until expanded. ...@@ -1112,7 +1125,7 @@ These details <em>remain</em> <strong>hidden</strong> until expanded.
--- ---
Markdown inside these tags is supported as well. Markdown inside these tags is also supported.
NOTE: NOTE:
If your Markdown isn't rendering correctly, try adding If your Markdown isn't rendering correctly, try adding
...@@ -1154,7 +1167,7 @@ These details <em>remain</em> <b>hidden</b> until expanded. ...@@ -1154,7 +1167,7 @@ These details <em>remain</em> <b>hidden</b> until expanded.
A line break is inserted (a new paragraph starts) if the previous text is A line break is inserted (a new paragraph starts) if the previous text is
ended with two newlines, like when you hit <kbd>Enter</kbd> twice in a row. If you only ended with two newlines, like when you hit <kbd>Enter</kbd> twice in a row. If you only
use one newline (hit <kbd>Enter</kbd> once), the next sentence remains part of the use one newline (hit <kbd>Enter</kbd> once), the next sentence remains part of the
same paragraph. This is useful if you want to keep long lines from wrapping, and keep same paragraph. Use this approach if you want to keep long lines from wrapping, and keep
them editable: them editable:
```markdown ```markdown
...@@ -1184,7 +1197,7 @@ GFM adheres to the Markdown specification in how [paragraphs and line breaks are ...@@ -1184,7 +1197,7 @@ GFM adheres to the Markdown specification in how [paragraphs and line breaks are
A paragraph is one or more consecutive lines of text, separated by one or A paragraph is one or more consecutive lines of text, separated by one or
more blank lines (two newlines at the end of the first paragraph), as [explained above](#line-breaks). more blank lines (two newlines at the end of the first paragraph), as [explained above](#line-breaks).
If you need more control over line breaks or soft returns, you can add a single line break Need more control over line breaks or soft returns? Add a single line break
by ending a line with a backslash, or two or more spaces. Two newlines in a row create a new by ending a line with a backslash, or two or more spaces. Two newlines in a row create a new
paragraph, with a blank line in between: paragraph, with a blank line in between:
...@@ -1404,8 +1417,8 @@ Example: ...@@ -1404,8 +1417,8 @@ Example:
### Superscripts / Subscripts ### Superscripts / Subscripts
Currently, CommonMark and GFM don't support the superscript syntax ( `x^2` ) that CommonMark and GFM don't support the Redcarpet superscript syntax ( `x^2` ).
Redcarpet does. You can use the standard HTML syntax for superscripts and subscripts: Use the standard HTML syntax for superscripts and subscripts:
```html ```html
The formula for water is H<sub>2</sub>O The formula for water is H<sub>2</sub>O
...@@ -1448,7 +1461,7 @@ Example: ...@@ -1448,7 +1461,7 @@ Example:
| cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It eventually wraps the text when the cell is too large for the display size. | | cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It eventually wraps the text when the cell is too large for the display size. |
| cell 7 | | cell 9 | | cell 7 | | cell 9 |
Additionally, you can choose the alignment of text within columns by adding colons (`:`) Additionally, you can choose the alignment of text in columns by adding colons (`:`)
to the sides of the "dash" lines in the second row. This affects every cell in the column: to the sides of the "dash" lines in the second row. This affects every cell in the column:
```markdown ```markdown
...@@ -1463,7 +1476,7 @@ to the sides of the "dash" lines in the second row. This affects every cell in t ...@@ -1463,7 +1476,7 @@ to the sides of the "dash" lines in the second row. This affects every cell in t
| Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 | | Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 |
| Cell 7 | Cell 8 | Cell 9 | Cell 10 | Cell 11 | Cell 12 | | Cell 7 | Cell 8 | Cell 9 | Cell 10 | Cell 11 | Cell 12 |
[Within GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#tables), [In GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#tables),
the headers are always left-aligned in Chrome and Firefox, and centered in Safari. the headers are always left-aligned in Chrome and Firefox, and centered in Safari.
You can use HTML formatting to adjust the rendering of tables. For example, you can You can use HTML formatting to adjust the rendering of tables. For example, you can
...@@ -1481,7 +1494,7 @@ use `<br>` tags to force a cell to have multiple lines: ...@@ -1481,7 +1494,7 @@ use `<br>` tags to force a cell to have multiple lines:
| Item1 | This is on one line | | Item1 | This is on one line |
| Item2 | This item has:<br>- Multiple items<br>- That we want listed separately | | Item2 | This item has:<br>- Multiple items<br>- That we want listed separately |
You can use HTML formatting within GitLab itself to add [task lists](#task-lists) with checkboxes, You can use HTML formatting in GitLab itself to add [task lists](#task-lists) with checkboxes,
but they do not render properly on `docs.gitlab.com`: but they do not render properly on `docs.gitlab.com`:
```markdown ```markdown
...@@ -1496,8 +1509,8 @@ but they do not render properly on `docs.gitlab.com`: ...@@ -1496,8 +1509,8 @@ but they do not render properly on `docs.gitlab.com`:
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/27205) in GitLab 12.7. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/27205) in GitLab 12.7.
If you're working in spreadsheet software (for example, Microsoft Excel, Google If you're working in spreadsheet software (for example, Microsoft Excel, Google
Sheets, or Apple Numbers), you can copy from a spreadsheet, and GitLab Sheets, or Apple Numbers), GitLab creates a Markdown table when you copy-and-paste
pastes it as a Markdown table. For example, suppose you have the from a spreadsheet. For example, suppose you have the
following spreadsheet: following spreadsheet:
![Copy from spreadsheet](img/markdown_copy_from_spreadsheet_v12_7.png) ![Copy from spreadsheet](img/markdown_copy_from_spreadsheet_v12_7.png)
...@@ -1513,4 +1526,4 @@ entry and paste the spreadsheet: ...@@ -1513,4 +1526,4 @@ entry and paste the spreadsheet:
- The original [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax) - The original [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax)
at Daring Fireball is an excellent resource for a detailed explanation of standard Markdown. at Daring Fireball is an excellent resource for a detailed explanation of standard Markdown.
- You can find the detailed specification for CommonMark in the [CommonMark Spec](https://spec.commonmark.org/current/). - You can find the detailed specification for CommonMark in the [CommonMark Spec](https://spec.commonmark.org/current/).
- The [CommonMark Dingus](https://spec.commonmark.org/dingus/) is a handy tool for testing CommonMark syntax. - The [CommonMark Dingus](https://spec.commonmark.org/dingus/) helps you test CommonMark syntax.
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