- Description:
This key defines configuration options for optional parser configurations.
The value is an object that can contain
snippetandremove_emptyproperties. These options control which snippet configuration is wrapped and whether empty values are removed.- Appears in:
└── Snippet └── params └── * └── Optional Parser Configuration └── options- Type:
ObjectRequired- Properties:
This key toggles whether to output an empty string, or no value at all.
Setting this key to
truewill output no value at all instead of an empty string. This will bubble up to any outer parsers, so may control whether they return output.By default, this key is
false(i.e., an empty string is output).- Examples:
In this example, we have configured optional parser options with a snippet reference.
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" } } } } } }