Replies: 2 comments
-
|
It's worth pointing out, that the link the TOC uses does not work. It doesn't link to anything and also isn't greyed out when scrolling past the page section that it should link to. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@Andre601 Is it a question worth asking to the maintainers of python-markdown? Unless you see somme direct connection to Mkdocs-Macros? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following template file included on a page to generate content:
Details
{% if page.meta.constructors %} ## Constructor Details {% for constructor in page.meta.constructors %} <div class="api-detail" markdown> {% set name = namespace(text = constructor.name ~ "(") %} {% for parameter in constructor.parameters %} {% set name.text = name.text ~ parameter.type %} {% if loop.revindex > 1 %}{% set name.text = name.text ~ ", " %}{% endif %} {% endfor %} {% set name.text = name.text ~ ")" %} {% if constructor.deprecated %} {% set name.text = "<api__deprecated></api__deprecated> " ~ name.text %} {% endif %} {% for attribute in constructor.attributes %} {% set name.text = "<api__{{- attribute -}}></api__{{- attribute -}}> " ~ name.text %} {% endfor %} ### {{ name.text | e }} { #{{ name.text | lower() | replace(' ', '-') | e }} } {% if constructor.deprecated %} /// deprecated | Deprecation Warning {{ constructor.deprecated }} /// {% endif %} {% if constructor.description %} <p class="api-detail__description"> {{ constructor.description }} </p> {% endif %} {% if constructor.parameters %} #### Parameters: { #{{ constructor.name | lower() | replace(' ', '-') | e }}-parameters } {% for parameter in constructor.parameters %} - {% for attribute in parameter.attributes %}<api__{{- attribute -}}></api__{{- attribute -}}>{% endfor %} `{{ parameter.type | e}}: {{ parameter.name }}`{% if parameter.description %} - {{ parameter.description }}{% endif %} {% endfor %} {% endif %} </div> {% endfor %} {% endif %}What I now noticed is, that the
tocextension of Python-Markdown has a mental breakdown when generating the link within the "Table of Contents" section.Either that or the Theme (Material for MkDocs) has a mental breakdown.
I'm unsure of what could be the cause here, but my current guesses go towards the
efilter within the{ #{{ name.text | lower() | replace(' ', '-') | e }} }part as the generated link seems to be similar to URL encoded values.To give an example, one site has the following page meta set:
And this is the resulting link within the
toc:...which is completely different from the one generated through the attribute list extension:
I ask here, as I believe this to be an issue on my end using the Macros plugin.
Here is also my current
pluginsandmarkdown_extensionsconfigurations:Details
Beta Was this translation helpful? Give feedback.
All reactions