spren9er / gfm-pdf

Atom package for converting GFM (GitHub Flavored Markdown) documents to PDF using wkhtmltopdf
http://atom.io/packages/gfm-pdf
MIT License
6 stars 4 forks source link

Problem with anchors with unicode letters #9

Open Saucy opened 8 years ago

Saucy commented 8 years ago

I'm using gfm-pdf v0.3.4, and GitHub pages (Jekyll) for page generation.

Having some troubles with anchors I use as ToC, the anchors contains Swedish letters. Edit: Also colons, semi-colons, etc too

I avoid this problem in my markdown file because I remove the letters from the urls, however gfm-pdf replaces the letters. Breaking the links in the pdf file. I've done some testing and using the PDF+HTML option in gfm-pdf I came to that conclusion.

Example:

.md:

[Köpa](#kpa)
...
# Köpa

.md - html output (Jekyll):

<a href="#kpa">Köpa</a>
...
<h1 id="kpa">Köpa</h1>

.html - gfm-pdf output:

<a href="#kpa">Köpa</a>
...
<h1 id="k-pa">Köpa</h1>

Is there anything I can make the gfm-pdf output to remove the letters, instead of replacing it with dashes?