Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
Fix issue #33
  • Loading branch information
Aymkdn committed Jan 9, 2020
1 parent 3da518b commit a9dea5c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified example.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,14 @@ module.exports = function(htmlText, options) {
// "tr" elements should always contain an array
if (ret.length === 1 && nodeName !== "tr") {
ret=ret[0];
if (typeof ret === "string") ret={text:ret};
if (ret.text) {
applyDefaultStyle(ret, nodeName);
setComputedStyle(ret, element.getAttribute("style"));
}

ret.style = (ret.style||[]).concat(['html-'+nodeName]);

// for TD and TH we want to include the style from TR
if (nodeName === "td" || nodeName === "th") ret.style.push('html-tr');
} else {
Expand Down
Loading

0 comments on commit a9dea5c

Please sign in to comment.