yzane / vscode-markdown-pdf

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

Backslash false encoded #124

Open jonguenther opened 5 years ago

jonguenther commented 5 years ago

Version: 1.2.0

OS: Win 7 Professional SP1

When rendering a markdown document with backslashes, markdown-pdf outputs ¥ instead.

I tried to render following snippet:


    - C:\\Users\\`<your username>`\\Anaconda3\\Scripts
    - C:\\Users\\`<your username>`\\Anaconda3
    - C:\\Users\\`<your username>`\\Anaconda3\bin
    - C:\\Users\\`<your username>`\\Anaconda3\\library\\bin

This is the output:

https://i.imgur.com/8IveLMR.png

Retried it on an empty document, with the same results. Repeating it with single backslashes does not change the output either.

I used UTF-8 as encoding and haven't changed the default settings.

eddyizm commented 5 years ago

I'm having the same issue and am not able to find a work around.

designingSparks commented 5 years ago

I have the same issue. I have also tried using the HTML entity for a backslash '\\' but to no avail.

Armaghast commented 4 years ago

Hello, here is a quick and dirty workaround: in markdown document, when required, surround double backslashes by HTML tags code: <code>\\</code>

Googling backslash converted to Yen symbol, I read some interesting posts regarding Japanese font Meiryo (like this one, for instance); then, checking the HTML produced by markdown-pdf, I found out this line:

body { font-family: "Meiryo", "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback"; }

markdown-pdf's setting "markdown-pdf.styles" is designed to overwrite default styles, that may be the right workaround. Not tested yet.

yzane commented 4 years ago

Please upgrade Markdown PDF to ver1.4.4 and try.