Skip to content

Commit

Permalink
v2.4.7
Browse files Browse the repository at this point in the history
Use '*' instead of 'auto' for full-width tables (see #151)
  • Loading branch information
Aymkdn committed Oct 10, 2022
1 parent 21995fd commit 74b592f
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 14 deletions.
9 changes: 0 additions & 9 deletions .github/no-response.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/needs-reply-remove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Remove needs-reply label

on:
issue_comment:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Remove needs-reply label
uses: octokit/request-action@v2.x
continue-on-error: true
with:
route: DELETE /repos/:repository/issues/:issue/labels/:label
repository: ${{ github.repository }}
issue: ${{ github.event.issue.number }}
label: waiting-for-requestor
days-before-close: 3
close-message: This issue has been automatically closed because the requestor didn't provide any additional comment.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/needs-reply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Close old issues that need reply

on:
issues:
types:
- labeled

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Close old issues that need reply
uses: dwieeb/needs-reply@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-label: waiting-for-requestor
days-before-close: 1
close-message: This issue has been automatically closed because the requestor didn't provide any additional comment.
2 changes: 1 addition & 1 deletion browser.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/browser-2.4.5.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/browser-2.4.7.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="browser-2.4.5.js"></script>
<script src="browser-2.4.7.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.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ function htmlToPdfMake(htmlText, options) {
if (tableWidths.length > 0) {
// if all columns are in 'auto' and if we have 'width:"100%"' for the table
// then put widths:['*', '*' …], for all columns
if (fullWidth && tableWidths.filter(function(w) { return w==='auto' }).length === tableWidths.length) tableWidths=tableWidths.map(function() { return '*' });
//if (fullWidth && tableWidths.filter(function(w) { return w==='auto' }).length === tableWidths.length) tableWidths=tableWidths.map(function() { return '*' });
// see https://github.com/Aymkdn/html-to-pdfmake/issues/151#issuecomment-1273015585
// if we have 'width:"100%"' for the table, replace "auto" width to "*"
if (fullWidth) tableWidths=tableWidths.map(function(w) { return w==='auto' ? '*' : w });
ret.table.widths = tableWidths;
}
if (tableHeights.length > 0) ret.table.heights = tableHeights;
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.4.6",
"version": "2.4.7",
"description": "Convert HTML code to PDFMake",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 74b592f

Please sign in to comment.