mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
docs: rename sections in "Preformatted text" for clarity
This commit is contained in:
parent
68e53dc43c
commit
adc059f3b0
1 changed files with 12 additions and 6 deletions
|
|
@ -14,13 +14,17 @@ preserved.
|
|||
|
||||
There are three ways to use preformatted text within your Markdown documents:
|
||||
|
||||
- [Indenting](#using-indentation) each line of a block of text by 4 or more spaces, or a tab character.
|
||||
- Beginning and ending a block of text with a row of 3 or more backtick (\`) or tilde (~) characters, referred to as a ["fenced" code block](#using-backticks).
|
||||
- [Indenting](#indented-blocks) each line of a block of text by 4 or more spaces, or a tab character.
|
||||
- Beginning and ending a block of text with a row of 3 or more backtick (\`) or
|
||||
tilde (~) characters, referred to as a ["fenced" code block](#fenced-code-blocks).
|
||||
- Wrapping HTML `<pre></pre>` tags around a block of text.
|
||||
|
||||
Fenced code blocks can optionally [specify a rendering hint](#rendering-hints) to apply syntax highlighting to the block.
|
||||
Fenced code blocks can optionally
|
||||
[specify a rendering hint](#rendering-hints-(syntax-highlighting))
|
||||
to apply syntax highlighting to the block.
|
||||
|
||||
## Using indentation
|
||||
<a id="using-indentation"></a> <!-- old section name, do not remove -->
|
||||
## Indented blocks
|
||||
|
||||
You can preformat a block of text or code by indenting the code with **4 or more spaces, or a tab character**.
|
||||
|
||||
|
|
@ -46,7 +50,8 @@ Indentation-based preformatting sometimes causes false positives where text is
|
|||
unintentionally preformatted; for this reason, it is disabled in some
|
||||
Markdown renderers, including in Codeberg Documentation.
|
||||
|
||||
## Using backticks
|
||||
<a id="using-backticks"></a> <!-- old section name, no not remove -->
|
||||
## Fenced code blocks
|
||||
|
||||
As an alternative, you can create blocks of preformatted text by starting and ending the block with a row of 3 or more backtick (\`) or tilde (~) characters. There should be an equal number of these characters at both start and end.
|
||||
|
||||
|
|
@ -72,7 +77,8 @@ as
|
|||
preformatted
|
||||
```
|
||||
|
||||
### Rendering hints
|
||||
<a id="rendering-hints"></a> <!-- old section name, do not remove -->
|
||||
### Rendering hints (syntax highlighting)
|
||||
|
||||
Sometime renderers use hints to syntax highlight the code in a preformatted section.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue