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

Function readFldChar

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

Source from the content-addressed store, hash-verified

915 var unknownComplexField = {type: "unknown"};
916
917 function readFldChar(element) {
918 var type = element.attributes["w:fldCharType"];
919 if (type === "begin") {
920 complexFieldStack.push(unknownComplexField);
921 currentInstrText = [];
922 } else if (type === "end") {
923 complexFieldStack.pop();
924 } else if (type === "separate") {
925 var href = parseHyperlinkFieldCode(currentInstrText.join(''));
926 var complexField = href === null ? unknownComplexField : {type: "hyperlink", href: href};
927 complexFieldStack.pop();
928 complexFieldStack.push(complexField);
929 }
930 return emptyResult();
931 }
932
933 function currentHyperlinkHref() {
934 var topHyperlink = _.last(complexFieldStack.filter(function(complexField) {

Callers

nothing calls this directly

Calls 2

parseHyperlinkFieldCodeFunction · 0.70
emptyResultFunction · 0.70

Tested by

no test coverage detected