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 /tests | |
| parent | 4d4d9e669b389be294373cf3c9bd4727dd5f32af (diff) | |
Ignore _GoBack bookmarks at parse-time
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/document-to-html.tests.js | 8 | ||||
| -rw-r--r-- | tests/docx/document-xml-reader.tests.js | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index 4863cf1..46f5649 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -429,14 +429,6 @@ describe('DocumentConverter', function() { assert.equal(result.value, '<span id="_Peter"></span><a href="#_Peter">Hello.</a>'); }); }); - - test('unreferenced bookmarks are not converted', function() { - var bookmarkStart = new documents.BookmarkStart({name: "_Unreferenced"}); - var converter = new DocumentConverter(); - return converter.convertToHtml(bookmarkStart).then(function(result) { - assert.equal(result.value, ''); - }); - }); }); function paragraphOfText(text, styleId, styleName) { diff --git a/tests/docx/document-xml-reader.tests.js b/tests/docx/document-xml-reader.tests.js index 35c806b..536f47b 100644 --- a/tests/docx/document-xml-reader.tests.js +++ b/tests/docx/document-xml-reader.tests.js @@ -225,6 +225,12 @@ describe("readXmlElement: ", function() { assert.deepEqual(result.value.type, "bookmarkStart"); }); + test('_GoBack bookmark is ignored', function() { + var bookmarkStart = new XmlElement("w:bookmarkStart", {"w:name": "_GoBack"}); + var result = readXmlElement(bookmarkStart); + assert.deepEqual(result.value, []); + }); + test("can read inline pictures", function() { var drawing = createInlineImage({ relationshipId: "rId5", |
