diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-09 20:37:31 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-09 20:37:31 +0000 |
| commit | a6233fafe736ff9abbdfe88f7f702ebd63ee4608 (patch) | |
| tree | 90728de083981c0eafada8e0181bc5614e20859a /lib/docx/document-xml-reader.js | |
| parent | 4d4d9e669b389be294373cf3c9bd4727dd5f32af (diff) | |
Ignore _GoBack bookmarks at parse-time
Diffstat (limited to 'lib/docx/document-xml-reader.js')
| -rw-r--r-- | lib/docx/document-xml-reader.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js index f25e7a3..7a0dd8a 100644 --- a/lib/docx/document-xml-reader.js +++ b/lib/docx/document-xml-reader.js @@ -200,9 +200,13 @@ function DocumentXmlReader(options) { }, "w:bookmarkStart": function(element){ var name = element.attributes["w:name"]; - return readXmlElements(element.children).map(function(){ - return new documents.BookmarkStart({name: name}); - }); + if (name === "_GoBack") { + return new Result([]); + } else { + return readXmlElements(element.children).map(function(){ + return new documents.BookmarkStart({name: name}); + }); + } }, "w:ins": readChildElements, |
