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

root_pair_delimiter

Table of contents

Description:

This key defines the delimiters that separate each key-value pair from the next when parsing snippet parameters.

The value is an array of strings, where each string specifies a delimiter token. For segments such as href="about" title="Hello World", this would be [" "] (a space). For segments such as href: about, title: "Hello World", this would be [","].

Appears in:
└── Snippet Format
    └── root_pair_delimiter
Type:
Array<root_pair_delimiter[*]>
Items:
[*]string#

This key represents an individual delimiter string in the root_pair_delimiter array.

The value is a string that specifies a delimiter token that separates key-value pairs when parsing snippet parameters.

Show examplesHide examples

In this example, we have configured a root pair delimiter to use a space.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[param]]>>
    params:
      param:
        parser: argument
        options:
          format:
            root_pair_delimiter:
              - ' '
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[param]]>>",
      "params": {
        "param": {
          "parser": "argument",
          "options": {
            "format": {
              "root_pair_delimiter": [
                " "
              ]
            }
          }
        }
      }
    }
  }
}
Examples:

In this example, we have configured root pair delimiter to use a space.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[param]]>>
    params:
      param:
        parser: argument
        options:
          format:
            root_pair_delimiter:
              - ' '
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[param]]>>",
      "params": {
        "param": {
          "parser": "argument",
          "options": {
            "format": {
              "root_pair_delimiter": [
                " "
              ]
            }
          }
        }
      }
    }
  }
}
Open in a new tab