This key defines a parser configuration that parses a single argument, optionally delimited by characters.
Useful for matching a single positional argument.
The argument parser is also used to parse a list of repeating arguments.
Appears in
└── Snippet
└── params
└── *
└── Argument Parser ConfigurationType
Object
Properties
This key defines configuration options for argument parser configurations.
The value is an object that can contain model and format properties. These options control how a single argument value is parsed and validated.
Appears in: Argument Parser Configuration.
Show examplesHide examples
In this example, we have configured argument parser options with a model and format.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
model:
editor_key: example_id
format:
string_boundary:
- '"'{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"model": {
"editor_key": "example_id"
},
"format": {
"string_boundary": [
"\""
]
}
}
}
}
}
}
}This key defines the parser type for argument parser configurations.
The value must be argument. This specifies that the parameter uses the argument parser, which parses a single argument value.
Appears in: Argument Parser Configuration.
Show examplesHide examples
In this example, we have configured an argument parser for a snippet parameter.
_snippets:
example:
snippet: <<example [[param]]>>
params:
param:
parser: argument
options:
model:
editor_key: example_id{
"_snippets": {
"example": {
"snippet": "<<example [[param]]>>",
"params": {
"param": {
"parser": "argument",
"options": {
"model": {
"editor_key": "example_id"
}
}
}
}
}
}
}Examples
In this example, we have configured an argument parser to parse a single positional argument.
{{<figure image.png>}}
└───────┘In this example, we have configured an argument parser to parse a list of repeating arguments.
{{<images image1.png image2.png image3.png>}}
└──────────────────────────────┘