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

Swedish special chars #16

Open
nozense opened this issue Apr 23, 2018 · 1 comment
Open

Swedish special chars #16

nozense opened this issue Apr 23, 2018 · 1 comment

Comments

@nozense
Copy link

nozense commented Apr 23, 2018

Disclaimer: i know nothing of JS, very little about Grav and less about github (=

Found that i had some problems with the swedish special chars "Å Ä Ö" in the anchor links and the auto-generated menu.

Solved this by adding

'å','ä',

to the "$rx1 = array" of AnchorsTwigExtension.php

and adding

.replace(/å/g, '').replace(/Å/g, '').replace(/ä/g, '').replace(/Ä/g, '').replace(/ö/g, '').replace(/Ö/g, '')

just before .toLowerCase() in anchors.min.js

Is this me not using the plugin the right way or is there a need for updates similar to the above?

Did not make a pull-request because i'm not sure how to actually do it and almost certain there is a better way to do these changes.

@ghost
Copy link

ghost commented May 24, 2019

This problem also exists with german special characters.
I solved this by commenting out the special character array
$rx1
in AnchorsTwigExtension.php and used an empty array instead:
$rx1 = array();

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

1 participant