MCPcopy Index your code
hub / github.com/TruthHun/BookStack / readContentTypesFromXml

Function readContentTypesFromXml

static/word2md/mammoth.browser.js:1454–1471  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1452
1453
1454function readContentTypesFromXml(element) {
1455 var extensionDefaults = {};
1456 var overrides = {};
1457
1458 element.children.forEach(function(child) {
1459 if (child.name === "content-types:Default") {
1460 extensionDefaults[child.attributes.Extension] = child.attributes.ContentType;
1461 }
1462 if (child.name === "content-types:Override") {
1463 var name = child.attributes.PartName;
1464 if (name.charAt(0) === "/") {
1465 name = name.substring(1);
1466 }
1467 overrides[name] = child.attributes.ContentType;
1468 }
1469 });
1470 return contentTypes(overrides, extensionDefaults);
1471}
1472
1473function contentTypes(overrides, extensionDefaults) {
1474 return {

Callers

nothing calls this directly

Calls 1

contentTypesFunction · 0.70

Tested by

no test coverage detected