-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Context
I have been really looking forward to using the typeset plugin with my documentation as many of my headers are referring to code or objects. Showing them in the TOC as <code> makes it much easier to read.
Bug description
When enabling macros and typeset the TOC seems to not correctly align, specifically when the header is set to be bold and the macros replacement text is a URL.
While putting together this description I started deleting items like extensions etc. in my mkdocs.yml file. I saw various changes in the rendering of what I outlined below. My 'issue' went away when I removed the toc_depth option from the toc extension. I am not sure if that is a bug with the TOC extension or with the way macros/URLs are being handled. Could use some direction on that and since I am not sure I left my bug report as is.
In my .md file I have the following:
### {{rq_host}}
The host object that is not bold.
### **{{rq_host}}**
The host object that is bold...
### **{{rq_test}}**
This is a test of the macros with a non-link/url feature
If I only include the ### {{rq_host}} which is a URL but not bold then everything is displayed without issue:
If we only include ### **{{rq_test}}** which is just plain text and bold then everything is displayed without issue:
Only when we use the combination of a link and the bold do we see an issue with the TOC alignment ### **{{rq_host}}**:
Note: it looks like the whole page is also bold (in previous examples it was not).
For reference, contents of the external yaml file used by macros:
rq_host: "[`host`](#test)"
rq_test: "Test information"
I tried reducing down the number of features in my mkdocs.yml and after deleting all of the content and navigation features I got the below which is what I am seeing in my other documentation (it was at this moment that I started playing around with the extensions and added the second paragraph at the top):
Related links
Reproduction
The example.zip didn't include the external macros folder so I unzipped it, added it and then re-zipped the files.
Steps to reproduce
- Create site
- Use macros, typeset and toc features/plugins
- Create macros page which references a URL
- include the macros link in the documentation and make the text bold
- Build documentation
Browser
Other
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.



