| 176 | return str |
| 177 | } |
| 178 | function addExampleInTable(exampleSteps, placeholders) { |
| 179 | const steps = JSON.parse(JSON.stringify(exampleSteps)) |
| 180 | for (const placeholder in placeholders) { |
| 181 | steps.map(step => { |
| 182 | step = { ...step } |
| 183 | if (step.dataTable) { |
| 184 | for (const id in step.dataTable.rows) { |
| 185 | const cells = step.dataTable.rows[id].cells |
| 186 | cells.map(c => (c.value = c.value.replace(`<${placeholder}>`, placeholders[placeholder]))) |
| 187 | } |
| 188 | } |
| 189 | return step |
| 190 | }) |
| 191 | } |
| 192 | return steps |
| 193 | } |
| 194 | |
| 195 | // Import translations at module level to avoid async in parser |
| 196 | let translations = null |