-
Notifications
You must be signed in to change notification settings - Fork 11
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
list formatting in template has wrong semantics #17
Comments
Hi @lid3rs , sorry I can't reproduce even when looking at the code toc.html.twig. There is no place that has your structure, i.e., |
My mistake, sorry. But if we are already here, is it possible somehow to create an object like: h1
h2
h3
h2
etc. because now it is: h1
h2
h3
h2
etc. And in this view it's hard to format it correctly with the list. |
Hi @lid3rs , Sorry I still don't understand your point. The plugin already emits a list hierarchy with links,e.g., <ul>
<li><a>My heading</a></li>
<li><ul>
<li><a>My Sub-heading 1</a></li>
<li><a>My Sub-heading 2</a></li>
</ul></li>
...
</ul> You can adjust the template to use other semantics. I still think either your theme or a plugin mingles something up. See my screenshot: |
Hi @Sommerregen |
Ok, got you code working, and it works semantically incorrect. I could not manage it by myself, but the result: Your's is: <li>item</li>
<li>
<ul>
<li>subitem</li>
</ul>
</li> Should be: <li>item
<ul>
<li>subitem</li>
</ul>
</li> This results in some problems with css: content: counters(section, ".") " "; |
@lid3rs You still have the wrong code. I tested with Toc v1.4.1 + Antimatter, standard settings and I really can't reproduce your issue. You still have either a problem in your template or there is a indeed a bug. However I can't test it without any real example. What did you do? How is your markdown page formatted? Please include a working example or send me your user folder, i.e., via slack. Thanks in advance. |
While the TOC list generated in html, it has wrong nesting:
Template: toc.html.twig
Wrong:
Should be:
The text was updated successfully, but these errors were encountered: