diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/body-reader.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 80715ca..6155304 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -20,7 +20,7 @@ function createBodyReader(options) { } function BodyReader(options) { - var complexFields = []; + var complexFieldStack = []; var currentInstrText = []; var relationships = options.relationships; var contentTypes = options.contentTypes; @@ -148,7 +148,7 @@ function BodyReader(options) { var properties = _.find(children, isRunProperties); children = children.filter(negate(isRunProperties)); - var scopedHyperlink = scopedComplexFieldOfType(complexFields, "hyperlink"); + var scopedHyperlink = scopedComplexFieldOfType(complexFieldStack, "hyperlink"); if (scopedHyperlink !== undefined) { children = [new documents.Hyperlink(children, {href: scopedHyperlink.href})]; } @@ -162,13 +162,13 @@ function BodyReader(options) { if (type === "begin") { currentInstrText = []; } else if (type === "end") { - complexFields.pop(); + complexFieldStack.pop(); } else if (type === "separate") { var href = parseHyperlinkFieldCode(currentInstrText.join('')); if (href !== null) { - complexFields.push({type: "hyperlink", href: href}); + complexFieldStack.push({type: "hyperlink", href: href}); } else { - complexFields.push({type: "unknown"}); + complexFieldStack.push({type: "unknown"}); } } return emptyResult(); |
