* Adding failing test case
* test runs and fails
* passing formatting test
* passing test
* refactoring moving different parts to their own files
* Refactoring - doc in prepareTemplateDOMTree
* Test of 2 formatted markers within same Text node passes
* passing test with {#each ...} and text before partially formatted
* Test with {/each} and text after partially formatted passing
* woops with proper test case
* test with partially formatted variable passes
9 lines
375 B
JavaScript
9 lines
375 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}' |