yzane / vscode-markdown-pdf

Markdown converter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf
Other
1.01k stars 206 forks source link

Wrong selection highlight boundaries in the exported PDF #325

Open CostachescuCristinel opened 1 year ago

CostachescuCristinel commented 1 year ago

All of the PDF files exported through this extension seem to have a problem with the content boundaries.
What I mean by this is that the selection background will render at least half-way lower than the content. This makes content selection not only weird, but also hard to manage.

Consider the following markdown:

# Hello, world!

This is an example paragraph.

Exported as PDF: example.pdf

The selection highlight renders like this:

Screenshot 2023-06-14 at 15 31 28

The issue does not happen with PDFs produced with other tools, which should exclude the case of rendering issues of the PDF viewer. I am most certain it is something related to the HTML/CSS in the pre-pdf export.

Environment: