Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOC links with non ascii characters #21

Closed
1978ajot opened this issue Mar 6, 2017 · 2 comments
Closed

TOC links with non ascii characters #21

1978ajot opened this issue Mar 6, 2017 · 2 comments

Comments

@1978ajot
Copy link

1978ajot commented Mar 6, 2017

I'm using pandoc to convert my markdown files to HTML format. When using :GenTocRedcarpet command, generated TOC links looks like:
[Wstępna konfiguracja karty](#wstępna-konfiguracja-karty)

Pandoc creates <h> tags that looks like:
<h2 id="wstepna-konfiguracja-karty">Wstępna konfiguracja karty</h2>

As you see, there are no letters other than ascii characters inside id attribute.

Is it possible to to pass link part of TOC through command like iconv -t ascii//TRANSLIT, so letters like ę, ą, ś will be replaced by e, a, s?

Regards,

Andrzej.

@mzlogin
Copy link
Owner

mzlogin commented Mar 6, 2017

https://github.com/jgm/pandoc/wiki/Pandoc-Tricks#toc-generation

This may helpful to solve your problem, use Pandoc's feature to get your goal achieve may better solution.

@1978ajot
Copy link
Author

1978ajot commented Mar 7, 2017

Thank you for your advice. That's not exactly what I need, but with a little bit of scripting it is quite usable solution for me.

@1978ajot 1978ajot closed this as completed Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants