md-to-pdf: bug: Watch mode only works once

Context:

  • version (md-to-pdf -v): 3.2.1
  • platform (Unix, macOS, Windows): Windows
  • node version: v10.18.0

Describe the bug:

The watch mode only works the first time after it generates an empty PDF.

A clear and concise description of what the bug is. Feel free to include screenshots.

  1. Create a documentation.md file
  2. Run md2pdf documentation.md --watch
  3. Open the PDF and see that’s it is generated correctly ✔️
  4. Make a change to documentation.md
  5. Open the PDF file and see that’s it is generated correctly ✔️
  6. Make a change to documentation.md
  7. Open the PDF file and see that’s the file empty now ❌
  8. You can repeat step 6 and 7 several time the file will always be empty now ❌

demo_bug_watch_md_to_pdf

The problem occurs also when adding --as-html.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

I would probably set the value to 250 to try having it work on “most” computers.

I don’t think I’ll provide a default value here because I can’t even reproduce the issue at all on macOS so it’s probably not even necessary for a good chunk of the users. But thanks for confirming that this fixes it, i’ll see that I make a commit and release this soon.