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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Copy link
Owner

squidfunk commented Jan 28, 2019

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

@squidfunk

This comment has been minimized.

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 label Jan 28, 2019

@CMTV

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Owner

squidfunk commented Jan 28, 2019

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

This comment has been minimized.

Copy link
Author

CMTV commented Jan 28, 2019

Yep, I did. The bug is fixed.

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Jan 28, 2019

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

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Jan 29, 2019

Fix released as part of 3.3.0.

@squidfunk squidfunk closed this Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment