- Description:
This key defines the whitespace indentation required when parsing content.
Configures the content parser to require whitespace indentation when parsing. Used when a snippet continues for as long as content is indented.
This option should only be used if required, since it prevents your Snippet from parsing if the whitespace does not match.
If you want parsing to be flexible, but the output to be formatted, use the Style options instead.
- Appears in:
└── Snippet └── params └── * └── Content Parser Configuration └── options └── indented_by- Type:
string- Examples:
- Copied to clipboard
_snippets: highlight: snippet: |- <<highlight>> [[inner]] <</highlight>> params: inner: parser: content options: editor_key: highlighted_text indented_by: ' '{ "_snippets": { "highlight": { "snippet": "<<highlight>>\n[[inner]]\n<</highlight>>", "params": { "inner": { "parser": "content", "options": { "editor_key": "highlighted_text", "indented_by": " " } } } } } } Example usage:
MarkdownCopied to clipboard## My blog post <<highlight>> My highlighted content! <</highlight>> <<highlight>> My highlighted content! <</highlight>> <<highlight>> My highlighted content! <</highlight>> Morbi leo risus, porta ac consectetur ac, vestibulum at eros.This will parse correctly as
My highlighted content!This will strip only the indentation that matches, and return
My highlighted content!This will not match this parser, as indentation is required. Use the
style.block.indentoption instead.