This key represents an individual forbidden token string in the params.*(content-parser-config).options.forbidden_tokens array.
The value is a string that specifies a token that will stop parsing content when encountered. This is useful when the content parser is being greedy and consuming more input than intended.
Appears in#
└── Snippet
└── params
└── *
└── Content Parser Configuration
└── options
└── forbidden_tokens
└── [*]Type#
string
Examples#
In this example, we have configured a forbidden token to stop parsing when encountering a less-than sign.
Copied to clipboard
_snippets:
highlight:
snippet: <<highlight>> [[content]] <</highlight>>
params:
content:
parser: content
options:
editor_key: highlighted_text
forbidden_tokens:
- <{
"_snippets": {
"highlight": {
"snippet": "<<highlight>> [[content]] <</highlight>>",
"params": {
"content": {
"parser": "content",
"options": {
"editor_key": "highlighted_text",
"forbidden_tokens": [
"<"
]
}
}
}
}
}
}