Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown file that starts with an H1 results in a blank PDF #2

Open
d3chapma opened this issue Oct 1, 2024 · 0 comments · May be fixed by #4
Open

Markdown file that starts with an H1 results in a blank PDF #2

d3chapma opened this issue Oct 1, 2024 · 0 comments · May be fixed by #4

Comments

@d3chapma
Copy link
Contributor

d3chapma commented Oct 1, 2024

Create a markdown file with contents:

# My Title

results in an empty PDF: test.pdf

Change the markdown to:

## My Title

or

a
# My Title

And you get the expected result test.pdf

It seems like what is causing it is main.go:115

  html := "<!DOCTYPE html>\n<html lang=en>\n<meta charset=UTF-8>\n<meta content=\"width=device-width,initial-scale=1\"name=viewport>\n  <link rel=\"stylesheet\" href=\"" + theme + ".css\">\n" + cssLinks + "<body>\n" + htmlBody + "<script>\"h\"==document.body.innerHTML[144]&&\"1\"==document.body.innerHTML[145]&&(document.body.style.marginTop=\"-10010px\")</script>"

Specifically the script tag. Is there a reason that is included?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant