diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-19 19:49:29 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-19 19:49:29 +0000 |
| commit | a88c8bbb769b88414633edf59c55da3495d3c511 (patch) | |
| tree | 2ff3b62473202e075101c378f9e6fb2cbe9ff818 | |
| parent | c089bf6bb4c565651f302ae5a57ac546223a68db (diff) | |
Allow matching against all runs
| -rw-r--r-- | lib/document-to-html.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index 61797a1..c8a9900 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -142,13 +142,11 @@ function DocumentConversion(options, comments) { paths.push(findHtmlPathForRunProperty("bold", "strong")); } var stylePath = htmlPaths.empty; - if (run.styleId) { - var style = findStyle(run); - if (style) { - stylePath = style.to; - } else { - messages.push(unrecognisedStyleWarning("run", run)); - } + var style = findStyle(run); + if (style) { + stylePath = style.to; + } else if (run.styleId) { + messages.push(unrecognisedStyleWarning("run", run)); } paths.push(stylePath); |
