Skip to content

Commit

Permalink
v2.3.4
Browse files Browse the repository at this point in the history
- Added support for `A` without `href` (see issue #117)
  • Loading branch information
Aymkdn committed Aug 18, 2021
1 parent aa58062 commit 4a9d07c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1>HTML to PDFMake convertor</h1>
<div id="pdf_ie" style="display:none;padding:3em">The PDF file is sent to you for download. Use a modern browser (like Chrome or Firefox) to display the PDF in this page.</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected].3/browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].4/browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pdfmake@latest/build/pdfmake.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pdfmake@latest/build/vfs_fonts.js"></script>
<script>
Expand Down
Binary file modified example.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ function htmlToPdfMake(htmlText, options) {
pointer.nodeName = "A";
return pointer;
}
ret = setLink(ret, element.getAttribute("href"));
if (element.getAttribute("href")) {
ret = setLink(ret, element.getAttribute("href"));
}
break;
}
case "FONT": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "html-to-pdfmake",
"version": "2.3.3",
"version": "2.3.4",
"description": "Convert HTML code to PDFMake",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 4a9d07c

Please sign in to comment.