diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-22 19:02:00 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-22 19:02:00 +0100 |
| commit | 6bb08960ce155202049ab505cb456b740462a974 (patch) | |
| tree | cb8d78d5febf95cb55f05e69f5dfcba0819f635c | |
| parent | ed8fdc9e31d6c60529bf6c8c6bd1bd81b1ca6153 (diff) | |
Include style ID in warning
| -rw-r--r-- | lib/document-to-html.js | 5 | ||||
| -rw-r--r-- | tests/document-to-html.tests.js | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index bd3a3d6..4f38b9d 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -148,5 +148,8 @@ function DocumentConverter(options) { } function unrecognisedStyleWarning(type, element) { - return results.warning("Unrecognised " + type + " style: '" + element.styleName + "'"); + return results.warning( + "Unrecognised " + type + " style: '" + element.styleName + "'" + + " (Style ID: " + element.styleId + ")" + ); } diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index b6e3254..b9a8476 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -100,7 +100,7 @@ describe('DocumentConverter', function() { ]); var converter = new DocumentConverter(); return converter.convertToHtml(document).then(function(result) { - assert.deepEqual(result.messages, [results.warning("Unrecognised paragraph style: 'Heading 1'")]); + assert.deepEqual(result.messages, [results.warning("Unrecognised paragraph style: 'Heading 1' (Style ID: Heading1)")]); }); }); @@ -174,7 +174,7 @@ describe('DocumentConverter', function() { var run = runOfText("Hello.", {styleId: "Heading1Char", styleName: "Heading 1 Char"}); var converter = new DocumentConverter(); return converter.convertToHtml(run).then(function(result) { - assert.deepEqual(result.messages, [results.warning("Unrecognised run style: 'Heading 1 Char'")]); + assert.deepEqual(result.messages, [results.warning("Unrecognised run style: 'Heading 1 Char' (Style ID: Heading1Char)")]); }); }); |
