* add template * Rename template * Add test for insert 2 images * image marker regex * Ajout d'un test pour vérifier que le texte du template est bon * WORK IN PROGRESS - trouver et évaluer la balise image * Create OfjsImage type * create addImageToOdtFile * Regenerate yo odt to inspect it * Add a draw image and a draw frame into odt file * Test if there are two draw:image in the generated document * Add pictures in manifest.xml to fix corrupted file * Adapt anchor type * Fix images aspect with ratio
11 lines
435 B
JavaScript
11 lines
435 B
JavaScript
// the regexps below are shared, so they shoudn't have state (no 'g' flag)
|
|
export const variableRegex = /\{([^{#\/:]+?)\}/
|
|
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*}/;
|
|
export const eachClosingMarker = '{/each}'
|