Recent searches

in

parser

On this page

This key defines the parser type for optional parser configurations.

The value must be optional. This specifies that the parameter uses the optional parser, which wraps another snippet configuration and makes it optional.

Appears in#

└── Snippet
    └── params
        └── *
            └── Optional Parser Configuration
                └── parser

Type#

"optional" Required

Examples#

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

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