11 lines
435 B
JavaScript
Raw Normal View History

// the regexps below are shared, so they shoudn't have state (no 'g' flag)
export const variableRegex = /\{([^{#\/:]+?)\}/
2025-07-21 18:58:51 +02:00
export const imageMarkerRegex = /{#image\s+([^}]+?)\s*}/;
export const ifStartMarkerRegex = /{#if\s+([^}]+?)\s*}/;
export const elseMarker = '{:else}'
export const closingIfMarker = '{/if}'
export const eachStartMarkerRegex = /{#each\s+([^}]+?)\s+as\s+([^}]+?)\s*}/;
2025-07-21 18:58:51 +02:00
export const eachClosingMarker = '{/each}'