This key defines inline formatting options for snippet output.
The value is an object that can contain leading and trailing properties. These options control whitespace for single-line snippet content.
Appears in#
└── Snippet Style
└── inlineType#
Object
Properties#
This key defines the leading whitespace string for inline snippet content.
The value is a string that specifies whitespace tokens (typically spaces) inserted before inline snippet content.
Appears in: Snippet Style inline.
Show examplesHide examples
In this example, we have configured inline leading whitespace to use a space.
_snippets:
highlight:
snippet: <<highlight>> [[content]] <</highlight>>
params:
content:
parser: content
options:
style:
inline:
leading: ' '{
"_snippets": {
"highlight": {
"snippet": "<<highlight>> [[content]] <</highlight>>",
"params": {
"content": {
"parser": "content",
"options": {
"style": {
"inline": {
"leading": " "
}
}
}
}
}
}
}
}This key defines the trailing whitespace string for inline snippet content.
The value is a string that specifies whitespace tokens (typically spaces) inserted after inline snippet content.
Appears in: Snippet Style inline.
Show examplesHide examples
In this example, we have configured inline trailing whitespace to use a space.
_snippets:
highlight:
snippet: <<highlight>> [[content]] <</highlight>>
params:
content:
parser: content
options:
style:
inline:
trailing: ' '{
"_snippets": {
"highlight": {
"snippet": "<<highlight>> [[content]] <</highlight>>",
"params": {
"content": {
"parser": "content",
"options": {
"style": {
"inline": {
"trailing": " "
}
}
}
}
}
}
}
}Examples#
In this example, we have configured inline formatting with leading and trailing spaces.
_snippets:
highlight:
snippet: <<highlight>> [[content]] <</highlight>>
params:
content:
parser: content
options:
style:
inline:
leading: ' '
trailing: ' '{
"_snippets": {
"highlight": {
"snippet": "<<highlight>> [[content]] <</highlight>>",
"params": {
"content": {
"parser": "content",
"options": {
"style": {
"inline": {
"leading": " ",
"trailing": " "
}
}
}
}
}
}
}
}