diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/body-reader.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 11aeec5..a19ecdb 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -159,7 +159,9 @@ function BodyReader(options) { "w:rPr": readRunProperties, "w:fldChar": function(element) { var type = element.attributes["w:fldCharType"]; - if (type === "end") { + if (type === "begin") { + currentInstrText = []; + } else if (type === "end") { complexFields.pop(); } else if (type === "separate") { var href = parseHyperlinkFieldCode(currentInstrText.join('')); @@ -168,7 +170,6 @@ function BodyReader(options) { } else { complexFields.push(null); } - currentInstrText = []; } return emptyResult(); }, |
