Understand shortcode syntax and parsing rules
masterThe compiler scans templates from left to right. Key behaviors include:
- Attributes: Supports quoted values with spaces and hyphenated keys (e.g.,
data-size="large"). - Void / self-closing: Tags without a matching closing tag (e.g.,
[alert type="info"]) are treated as self-closing. - Nested same-name tags: Uses balanced opening/closing pairs to preserve innermost structures.
- Unknown
[text: Text in square brackets that doesn't match a registered shortcode is left untouched. - Escaping: Use double brackets
[[b]]to output a literal[b].