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

"uslugify" breaks header anchors list #972

Closed
CMTV opened this issue Jan 27, 2019 · 8 comments
Closed

"uslugify" breaks header anchors list #972

CMTV opened this issue Jan 27, 2019 · 8 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@CMTV
Copy link

CMTV commented Jan 27, 2019

Description

Setting custom slugify function "uslugify" from pymodown breaks header anchors block at the right.

markdown_extensions:
    ...
    - toc:
          permalink: '#'
          slugify: !!python/name:pymdownx.slugs.uslugify
    ...

Expected behavior

When scrolling down headers are fading out. This gives a visual understanding of current position on the page.

Actual behavior

When scrolling, the browser console spams the following error:
error

error2

Steps to reproduce the bug

  1. In mkdocs.yml set a custom slugify function ("uslugify" in my case)
  2. Add some cyrillic headers in index.md
  3. Anchor links are not fading and the console spams the error when scrolling the page
@squidfunk
Copy link
Owner

Thanks for reporting, I can confirm this issue. Will look into it.

@squidfunk
Copy link
Owner

squidfunk commented Jan 28, 2019

I tried to reproduce your test case and think I have a potential fix in ee0371d. Please try the master to see if the issue persists.

@squidfunk squidfunk added the bug Issue reports a bug label Jan 28, 2019
@CMTV
Copy link
Author

CMTV commented Jan 28, 2019

Pardon, how can I update mkdocs theme?

I tried to run pip install mkdocs-material -U --force-reinstall. Nothing has changed...

@CMTV
Copy link
Author

CMTV commented Jan 28, 2019

Ok. I can confirm it is fixed when directly adding material folder and setting custom_dir: 'material'.

@squidfunk
Copy link
Owner

The idea was that you check out the latest source from GitHub (see instructions) and validate whether the error is gone. Did you do that?

@CMTV
Copy link
Author

CMTV commented Jan 28, 2019

Yep, I did. The bug is fixed.

@squidfunk
Copy link
Owner

Perfect! I will issue a release within the next few days. Until then, please use the current master.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Jan 28, 2019
@squidfunk
Copy link
Owner

Fix released as part of 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants