From a88c8bbb769b88414633edf59c55da3495d3c511 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 19 Nov 2016 19:49:29 +0000 Subject: Allow matching against all runs --- lib/document-to-html.js | 12 +++++------- 1 file 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); -- cgit v1.2.3