☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

leading

On this page

Description:

This key defines the leading whitespace string for block-level snippet content.

The value is a string that specifies whitespace tokens (typically newlines) inserted before block-level snippet content.

Appears in:
└── Snippet Style
    └── block
        └── leading
Type:
string
Examples:

In this example, we have configured block leading whitespace to use a newline.

Copied to clipboard
_snippets:
  highlight:
    snippet: <<highlight>> [[content]] <</highlight>>
    params:
      content:
        parser: content
        options:
          style:
            block:
              leading: \n
{
  "_snippets": {
    "highlight": {
      "snippet": "<<highlight>> [[content]] <</highlight>>",
      "params": {
        "content": {
          "parser": "content",
          "options": {
            "style": {
              "block": {
                "leading": "\\n"
              }
            }
          }
        }
      }
    }
  }
}
Open in a new tab