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

Fix broken syntax in README.md #64

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Conversation

stephffuller
Copy link
Contributor

Without the spaces I added, I receive the following errors when using autorefs:

WARNING - [macros] - ERROR # Macro Syntax Error

       _File_: `dir/xyz.md`

       _Line 2 in Markdown file:_ **Missing end of comment tag**
       ```markdown
       [](){#abc}
       ```

WARNING - mkdocs_autorefs: dir/xyz.md: Could not find cross-reference target '(../abc.md)'

Without the spaces I added, I receive the following errors when using autorefs:

WARNING -  [macros] - ERROR # _Macro Syntax Error_

           _File_: `dir/xyz.md`

           _Line 2 in Markdown file:_ **Missing end of comment tag**
           ```markdown
           [](){#abc}
           ```
WARNING -  mkdocs_autorefs: dir/xyz.md: Could not find cross-reference target '(../abc.md)'
Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

Yeah the mkdocs-macros-plugin thinks {# is the opening of a Jinja comment block. Adding spaces in our docs is reasonable to ensure compatibility with this plugin 🙂

@pawamoy pawamoy merged commit 275e9f5 into mkdocstrings:main Feb 19, 2025
25 checks passed
@stephffuller
Copy link
Contributor Author

@pawamoy That's good to know - I'll have to keep an eye out for other plugin interop issues.

Doing some additional testing today, and I found that I was able to use autorefs within these types of snippets, so that was amazing! (I never did manage to get the Python markdown / Material version of snippets working).

@pawamoy
Copy link
Member

pawamoy commented Feb 20, 2025

Exactly interoperability issue, as you say :) Some projects are Python-Markdown extensions, others are MkDocs plugins, and they cannot always work together easily ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants