vscode-markdown-pdf icon indicating copy to clipboard operation
vscode-markdown-pdf copied to clipboard

Problem escaping | character in table

Open tarockx opened this issue 2 years ago • 0 comments

Hello

I'm using the latest version of the plugin (v1.4.4) and I noticed an issue when rendering markdown tables.

Let's consider this markdown table for example:

|Param|Flags|
|-|-|
|param 1|valid flags: `first\|second\|third`|
|param 2|valid flags: `first\|second`|

As you can see, I'm using a backslash to escape the | characters that are part of the text and should not be considered as column separators. This is rendered correctly in the VS Code preview window and also on GitHub, here's how it looks like: image

however when generating a PDF with markdown-pdf the output I get is this:

image

As you can see, it is a bit weird: it incorrectly prints the backslashes as if they're part of the text, but at the same time it seems to be correctly escaping the | character because it is also printed instead of being interpreted as a column separator.

Any idea what is causing this? Is it a bug, or am I using the wrong syntax here?

Thanks!

tarockx avatar Feb 08 '23 10:02 tarockx