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

Function readCommentElement

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

Source from the content-addressed store, hash-verified

1413 }
1414
1415 function readCommentElement(element) {
1416 var id = element.attributes["w:id"];
1417
1418 function readOptionalAttribute(name) {
1419 return (element.attributes[name] || "").trim() || null;
1420 }
1421
1422 return bodyReader.readXmlElements(element.children)
1423 .map(function(body) {
1424 return documents.comment({
1425 commentId: id,
1426 body: body,
1427 authorName: readOptionalAttribute("w:author"),
1428 authorInitials: readOptionalAttribute("w:initials")
1429 });
1430 });
1431 }
1432
1433 return readCommentsXml;
1434}

Callers

nothing calls this directly

Calls 1

readOptionalAttributeFunction · 0.70

Tested by

no test coverage detected