diff --git a/content/markdown/preformatted-text.md b/content/markdown/preformatted-text.md index 66eb986..3b7b682 100644 --- a/content/markdown/preformatted-text.md +++ b/content/markdown/preformatted-text.md @@ -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 `
` 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 + +## 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 + +## 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 + +### Rendering hints (syntax highlighting) Sometime renderers use hints to syntax highlight the code in a preformatted section.