* Adjust variable marker to ignore {:else}
* Getting start branch right content and end branch left content when extracting block content
* remove open if block after {/if}
* look for left/right branch content only up to common ancestor
* fix test case to new reality
* fix minor bug
9 lines
376 B
JavaScript
9 lines
376 B
JavaScript
// the regexps below are shared, so they shoudn't have state (no 'g' flag)
|
|
export const variableRegex = /\{([^{#\/:]+?)\}/
|
|
|
|
export const ifStartMarkerRegex = /{#if\s+([^}]+?)\s*}/;
|
|
export const elseMarker = '{:else}'
|
|
export const closingIfMarker = '{/if}'
|
|
|
|
export const eachStartMarkerRegex = /{#each\s+([^}]+?)\s+as\s+([^}]+?)\s*}/;
|
|
export const eachClosingMarker = '{/each}' |