aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-03-28 12:50:16 +0100
committerMichael Williamson <mike@zwobble.org>2016-03-28 13:47:37 +0100
commit1caa452c06f31f35ee5ad15f0e9dae97b928daa3 (patch)
tree4bdd221a945476ba9fd244faf0b20d829390c8b4 /tests
parentf31e5ac93358e84a3cd02c53def6dee0906ce3de (diff)
Generated IDs no longer insert a hyphen after the ID prefix
Diffstat (limited to 'tests')
-rw-r--r--tests/document-to-html.tests.js8
-rw-r--r--tests/mammoth.tests.js6
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js
index 2b23613..fae4da5 100644
--- a/tests/document-to-html.tests.js
+++ b/tests/document-to-html.tests.js
@@ -346,7 +346,7 @@ describe('DocumentConverter', function() {
{anchor: "_Peter"}
);
var converter = new DocumentConverter({
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
});
return converter.convertToHtml(hyperlink).then(function(result) {
assert.equal(result.value, '<a href="#doc-42-_Peter">Hello.</a>');
@@ -356,7 +356,7 @@ describe('DocumentConverter', function() {
test('bookmarks are converted to anchors', function() {
var bookmarkStart = new documents.BookmarkStart({name: "_Peter"});
var converter = new DocumentConverter({
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
});
var document = new documents.Document([bookmarkStart]);
return converter.convertToHtml(document).then(function(result) {
@@ -426,7 +426,7 @@ describe('DocumentConverter', function() {
noteId: "4"
});
var converter = new DocumentConverter({
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
});
return converter.convertToHtml(footnoteReference).then(function(result) {
assert.equal(result.value, '<sup><a href="#doc-42-footnote-4" id="doc-42-footnote-ref-4">[1]</a></sup>');
@@ -455,7 +455,7 @@ describe('DocumentConverter', function() {
);
var converter = new DocumentConverter({
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
});
return converter.convertToHtml(document).then(function(result) {
var expectedOutput = '<p>Knock knock<sup><a href="#doc-42-footnote-4" id="doc-42-footnote-ref-4">[1]</a></sup></p>' +
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index 34adb09..0f0ad53 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -226,7 +226,7 @@ describe('mammoth', function() {
// TODO: don't duplicate footnotes with multiple references
var docxPath = path.join(__dirname, "test-data/footnotes.docx");
var options = {
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
};
return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
var expectedOutput = '<p>Ouch' +
@@ -242,7 +242,7 @@ describe('mammoth', function() {
test('endnotes are appended to text', function() {
var docxPath = path.join(__dirname, "test-data/endnotes.docx");
var options = {
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
};
return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
var expectedOutput = '<p>Ouch' +
@@ -258,7 +258,7 @@ describe('mammoth', function() {
test('relationships are handled properly in footnotes', function() {
var docxPath = path.join(__dirname, "test-data/footnote-hyperlink.docx");
var options = {
- idPrefix: "doc-42"
+ idPrefix: "doc-42-"
};
return mammoth.convertToHtml({path: docxPath}, options).then(function(result) {
var expectedOutput =