Enhancement: Parse sections from snippets #511

Closed
opened 2026-10-05 02:50:54 +02:00 by adam · 0 comments
Owner

Parse the variables from template sections to allow optional template variables.

For example when the label field is empty, it should not be rendered:

Xnapper-2023-09-06-13 38 46

When the label field contains data:

Xnapper-2023-09-06-13 39 47
:::{{type}}{{#label}}{{[label}}]{{/label}}
{{&content}}
:::
Parse the variables from template sections to allow optional template variables. For example when the label field is empty, it should not be rendered: <img width="702" alt="Xnapper-2023-09-06-13 38 46" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/cb3cf0ea-d37c-484c-a365-cb6004b20821"> When the label field contains data: <img width="702" alt="Xnapper-2023-09-06-13 39 47" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/032f21fe-5335-4917-bc51-f1b99d1a5ff5"> ``` :::{{type}}{{#label}}{{[label}}]{{/label}} {{&content}} ::: ``` <!-- github-sync-id:1883833419 -->
adam closed this issue 2026-10-05 02:50:54 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#511