Skip to content
New issue

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

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

Already on GitHub? # to your account

slugify doesn't work #3

Open
GooRoo opened this issue Jan 3, 2023 · 0 comments
Open

slugify doesn't work #3

GooRoo opened this issue Jan 3, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@GooRoo
Copy link
Owner

GooRoo commented Jan 3, 2023

Steps to reproduce:

  1. Add a header:
    # Some header
  2. Add a link to it:
    [[#Some header]]
    

Actual result:

A crash:

  File "/Users/gooroo/Library/Caches/pypoetry/virtualenvs/awesome-brands-Zxjvij1K-py3.10/lib/python3.10/site-packages/mkdocs_obsidian_bridge/plugin.py", line 90, in on_page_markdown
    markdown = self.process_obsidian_links(page_path, markdown)
  File "/Users/gooroo/Library/Caches/pypoetry/virtualenvs/awesome-brands-Zxjvij1K-py3.10/lib/python3.10/site-packages/mkdocs_obsidian_bridge/plugin.py", line 262, in process_obsidian_links
    processed_chunks = [
  File "/Users/gooroo/Library/Caches/pypoetry/virtualenvs/awesome-brands-Zxjvij1K-py3.10/lib/python3.10/site-packages/mkdocs_obsidian_bridge/plugin.py", line 263, in <listcomp>
    process_chunk(i, c)
  File "/Users/gooroo/Library/Caches/pypoetry/virtualenvs/awesome-brands-Zxjvij1K-py3.10/lib/python3.10/site-packages/mkdocs_obsidian_bridge/plugin.py", line 242, in process_chunk
    return re.sub(
  File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/Users/gooroo/Library/Caches/pypoetry/virtualenvs/awesome-brands-Zxjvij1K-py3.10/lib/python3.10/site-packages/mkdocs_obsidian_bridge/plugin.py", line 280, in replace_obsidian_link
    self.slugify(match['fragment'])
  File "/Users/gooroo/Library/Caches/pypoetry/virtualenvs/awesome-brands-Zxjvij1K-py3.10/lib/python3.10/site-packages/mkdocs_obsidian_bridge/plugin.py", line 100, in slugify
    return f'#{self.toc_slugify(text)}'
TypeError: _uslugify() got an unexpected keyword argument 'separator'

Expected result:

Link expansion works normally.

@GooRoo GooRoo added the bug Something isn't working label Jan 3, 2023
@GooRoo GooRoo self-assigned this Jan 3, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant