(input, options)
| 2373 | } |
| 2374 | |
| 2375 | function convert(input, options) { |
| 2376 | options = readOptions(options); |
| 2377 | |
| 2378 | return unzip.openZip(input) |
| 2379 | .tap(function(docxFile) { |
| 2380 | return docxStyleMap.readStyleMap(docxFile).then(function(styleMap) { |
| 2381 | options.embeddedStyleMap = styleMap; |
| 2382 | }); |
| 2383 | }) |
| 2384 | .then(function(docxFile) { |
| 2385 | return docxReader.read(docxFile, input) |
| 2386 | .then(function(documentResult) { |
| 2387 | return documentResult.map(options.transformDocument); |
| 2388 | }) |
| 2389 | .then(function(documentResult) { |
| 2390 | return convertDocumentToHtml(documentResult, options); |
| 2391 | }); |
| 2392 | }); |
| 2393 | } |
| 2394 | |
| 2395 | function readEmbeddedStyleMap(input) { |
| 2396 | return unzip.openZip(input) |
no test coverage detected