realtimeprojects / mkdocs-ezglossary

Glossary support for mkdocs
MIT License
8 stars 1 forks source link

Glossary entries with hypens lead to errors in produced links #11

Closed eufjan closed 2 months ago

eufjan commented 2 months ago

Hi there, We experienced problems with glossary entries which contain hyphens.

When citing entry: data:Non-personal Metadata

the produced HTML output looks like this <a class="mkdocs-ezglossary-link" id="data_Non" title="" href="[../glossary/#data_Non-personal_Metadata_defs_0](http://127.0.0.1:8000/glossary/#data_Non-personal_Metadata_defs_0)">Non-personal Metadata</a>-personal_Metadata_refs_0

I.e. it erroneously adds the part after hyphen twice (above the part after >), leading to the following output

Non-personal Metadata-personal_Metadata_refs_0

Is this a misconfiguration on our side or is this a general problem with hyphen in glossary entry titles?

realtimeprojects commented 2 months ago

From the first view, it looks like this is a general problem with hyphens in the glossary entry, but it should not be hard to fix. I try to have a look at it tonight.

realtimeprojects commented 2 months ago

This issue should now be fixed in the 1.6.3 release.

Thanks for reporting.

The allowed characters for the terms is quite restrictive at this time, but hyphens should be definitely allowed.