Table of Contents

ComboStrap UI - Preformatted (Indented code block)

About

Preformatted is a syntax that considers any successive lines that starts with two spaces as a block of code.

This is also known as indented code block and is a minimal syntax to create a block of code with no syntax highlighting.

since 1.11

Syntax

A line that starts with a couple of spaces is seen as a code of block with no syntax highlighting. If you want to add a language, you need to use the code component

  Two spaces starts a block of code

Without any content, the indented code block is not printed. You can disable this feature with the preformattedEmptyContentNotPrintedEnable configuration

Demo

Default

  A line that starts with a couple of spaces is seen as a code of block
  The next one with two spaces will also be part of the same block
A line that starts with a couple of spaces is seen as a code of block
The next one with two spaces will also be part of the same block

No content

Without any content, the indented code block is not printed.

You can disable this feature with the preformattedEmptyContentNotPrintedEnable configuration

  

Configuration

preformattedEnable

The configuration preformattedEnable permits to enable or disable this feature.

preformattedEmptyContentNotPrintedEnable

If this configuration is not check, a block of code will be printed even if there is no content.