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

"#" + number renders a link to an issue in this repo #3830

Closed
5 tasks done
Vegebutcher opened this issue Apr 22, 2022 · 2 comments
Closed
5 tasks done

"#" + number renders a link to an issue in this repo #3830

Vegebutcher opened this issue Apr 22, 2022 · 2 comments
Labels
resolved by config change Issue can be mitigated by the reporter

Comments

@Vegebutcher
Copy link
Contributor

Vegebutcher commented Apr 22, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When I use something like in step #5, the #5 part is rendered as a hyperlink to https://github.com/squidfunk/mkdocs-material/issues/#, where # is replaced with the provided number, e.g.: https://github.com/squidfunk/mkdocs-material/issues/5:

steps

Expected behaviour

The #x part should be left as it is. I know I can escape it with a backslash, but why does it render into a link to a GH issue?

Actual behaviour

step #1 in a MD file = step #1 in a rendered page

Steps to reproduce

  1. Use #1 somewhere in your source MD file.
  2. Run mkdocs with material template.
  3. Check the rendered page.

Package versions

  • Python: latest
  • MkDocs: 1.3.0
  • Material: 8.2.9

Configuration

theme:
  name: material
  language: en
  features:
    - content.code.annotate
    # - content.tabs.link
    # - header.autohide
    # - navigation.expand
    - navigation.indexes
    # - navigation.instant
    # - navigation.sections
    - navigation.tabs
    # - navigation.tabs.sticky
    - navigation.top
    - navigation.tracking
    - search.highlight
    - search.share
    - search.suggest
    - toc.follow
    # - toc.integrate
  palette:
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/weather-night
        name: Switch to dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: red
      accent: red
      toggle:
        icon: material/weather-sunny
        name: Switch to light mode
  font:
    text: Lato
    code: Roboto Mono
  favicon: assets/favicon.jpg
  logo: assets/logo.svg

# Plugins
plugins:
  - search
  - minify:
      minify_html: true

# Customization

# Extensions
markdown_extensions:
  - abbr
  - admonition
  - attr_list
  - def_list
  - footnotes
  - meta
  - md_in_html
  - toc:
      permalink: true
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.betterem:
      smart_enable: all
  - pymdownx.caret
  - pymdownx.details
  - pymdownx.emoji:
      emoji_generator: !!python/name:materialx.emoji.to_svg
      emoji_index: !!python/name:materialx.emoji.twemoji
  - pymdownx.highlight:
      anchor_linenums: true
  - pymdownx.inlinehilite
  - pymdownx.keys
  - pymdownx.magiclink:
      repo_url_shorthand: true
      user: squidfunk
      repo: mkdocs-material
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
  - pymdownx.tabbed:
      alternate_style: true
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tilde

System information

  • Operating system: macOS Monterey 12.3.1
  • Browser: latest Ff, Chrome and Edge
  • project deployed on GL Pages
@squidfunk
Copy link
Owner

squidfunk commented Apr 22, 2022

Thank for reporting. This is due to the pymdownx.magiclink extension, which you have enabled. If you remove the following lines from mkdocs.yml, hash + number will not be converted anymore:

- pymdownx.magiclink:
      repo_url_shorthand: true
      user: squidfunk
      repo: mkdocs-material

@squidfunk squidfunk added the resolved by config change Issue can be mitigated by the reporter label Apr 22, 2022
@Vegebutcher
Copy link
Contributor Author

Oh my goodness, what a dumbass I am! Sorry for that. I copied mkdocs.yml from your project to make sure I got everything I needed, commented out the unnecessary things, but didn't notice this one.

My apologies once again and thanks for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved by config change Issue can be mitigated by the reporter
Projects
None yet
Development

No branches or pull requests

2 participants