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

Repeating Parser Configuration

Table of contents

Description:

This key defines a higher-order parser configuration that wraps a snippet string and allows it to repeat.

Appears in:
└── Snippet
    └── params
        └── *
            └── Repeating Parser Configuration
Type:
Object
Properties:
optionsObject Required#

This key defines configuration options for repeating parser configurations.

The value is an object that can contain snippet, editor_key, output_delimiter, default_length, style, and optional properties. These options control which snippet configuration is repeated and how repetitions are handled.

Show examplesHide examples

In this example, we have configured repeating parser options with a snippet reference.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[repeating_content]]>>
    params:
      repeating_content:
        parser: repeating
        options:
          snippet: content
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[repeating_content]]>>",
      "params": {
        "repeating_content": {
          "parser": "repeating",
          "options": {
            "snippet": "content"
          }
        }
      }
    }
  }
}
parser"repeating" Required#

This key defines the parser type for repeating parser configurations.

The value must be repeating. This specifies that the parameter uses the repeating parser, which allows a snippet configuration to appear multiple times.

Show examplesHide examples

In this example, we have configured a repeating parser for a snippet parameter.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[repeating_content]]>>
    params:
      repeating_content:
        parser: repeating
        options:
          snippet: content
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[repeating_content]]>>",
      "params": {
        "repeating_content": {
          "parser": "repeating",
          "options": {
            "snippet": "content"
          }
        }
      }
    }
  }
}
Examples:
Open in a new tab