Closed gurbindersingh closed 2 years ago
Indeed, the code is wrong, it should be:
if (footerCenter) {
cmdArguments.push('--footer-center', footerCenter)
}
The type declaration should also be fixed on the html2pdf
function since footerCenter
is either string | undefined
.
@gurbindersingh are you willing to submit a fix?
Sure thing. Is there anything I should keep in mind? The contribution guidelines don't mention pull requests.
You should run the linter before opening a pull request: npm run lint
.
You can also run the tests suite even though we currently have very few tests: npm t
.
Our plan is to progressively add more tests 😉
Description
The PDF generated using wkthtmltopdf only has the word "undefined" in the footer. I double checked by running it manually and it didn't happen. I believe it's because this statement
https://github.com/asciidoctor/asciidoctor-vscode/blob/e15256254407d508aca84c3d6553d81d002f0ddc/src/commands/exportAsPDF.ts#L258
is missing a
&& footerCenter !== undefined
.System Information
To Reproduce
Steps to reproduce the issue: