MCPcopy Create free account
hub / github.com/TruthHun/BookStack / convert

Function convert

static/word2md/mammoth.browser.js:2375–2393  ·  view source on GitHub ↗
(input, options)

Source from the content-addressed store, hash-verified

2373}
2374
2375function 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
2395function readEmbeddedStyleMap(input) {
2396 return unzip.openZip(input)

Callers 2

convertToHtmlFunction · 0.70
convertToMarkdownFunction · 0.70

Calls 2

readOptionsFunction · 0.70
convertDocumentToHtmlFunction · 0.70

Tested by

no test coverage detected