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

Function readRunProperties

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

Source from the content-addressed store, hash-verified

856 }
857
858 function readRunProperties(element) {
859 return readRunStyle(element).map(function(style) {
860 return {
861 type: "runProperties",
862 styleId: style.styleId,
863 styleName: style.name,
864 verticalAlignment: element.firstOrEmpty("w:vertAlign").attributes["w:val"],
865 font: element.firstOrEmpty("w:rFonts").attributes["w:ascii"],
866 isBold: readBooleanElement(element.first("w:b")),
867 isUnderline: readBooleanElement(element.first("w:u")),
868 isItalic: readBooleanElement(element.first("w:i")),
869 isStrikethrough: readBooleanElement(element.first("w:strike")),
870 isSmallCaps: readBooleanElement(element.first("w:smallCaps"))
871 };
872 });
873 }
874
875 function readBooleanElement(element) {
876 if (element) {

Callers

nothing calls this directly

Calls 2

readRunStyleFunction · 0.70
readBooleanElementFunction · 0.70

Tested by

no test coverage detected