symfony-tools/docs-builder

Unnecessary fragments in some TOC links

javiereguiluz opened this issue · 3 comments

In this page: https://symfony.com/doc/current/bundles/EasyAdminBundle/index.html

The TOC source code looks like this:

<div class="toctree-wrapper compound">
<ul>
<li class="..."><a class="..." href="dashboards.html">Dashboards</a></li>
<li class="..."><a class="..." href="crud.html">CRUD Controllers</a></li>
<li class="..."><a class="..." href="design.html">Design</a></li>
<li class="..."><a class="..." href="fields.html">Fields</a></li>
<li class="..."><a class="..." href="filters.html">Filters</a></li>
<li class="..."><a class="..." href="actions.html">Actions</a></li>
<li class="..."><a class="..." href="security.html">Security</a></li>
<li class="..."><a class="..." href="events.html">Events</a></li>
<li class="..."><a class="..." href="upgrade.html">Upgrading from EasyAdmin 2 to EasyAdmin 3</a></li>
</ul>
</div>

But in the new RST parser, it looks like this:

<div class="toctree-wrapper compound">
<ul>
<li><a href="dashboards.html#dashboards">Dashboards</a></li>
<li><a href="crud.html#crud-controllers">CRUD Controllers</a></li>
<li><a href="design.html#design">Design</a></li>
<li><a href="fields.html#fields">Fields</a></li>
<li><a href="filters.html#filters">Filters</a></li>
<li><a href="actions.html#actions">Actions</a></li>
<li><a href="security.html#security">Security</a></li>
<li><a href="events.html#events">Events</a></li>
<li><a href="upgrade.html#upgrading-from-easyadmin-2-to-easyadmin-3">Upgrading from EasyAdmin 2 to EasyAdmin 3</a></li>
</ul>
</div>

All entries have an unnecessary page fragment (e.g. dashboards.html#dashboards instead of just dashboards.html).

The source code (see https://raw.githubusercontent.com/EasyCorp/EasyAdminBundle/master/doc/index.rst): is just:

EasyAdmin
=========

[...]

Table of Contents
-----------------

.. toctree::
    :maxdepth: 1

    dashboards
    crud
    design
    fields
    filters
    actions
    security
    events
    upgrade

[...]

Hi @javiereguiluz

I've opened an issue on the parser about that. Let's see what they answer, otherwise I'd make it inside the docs builder

Closing as fixed by doctrine/rst-parser#139 Thanks Nicolas for yet another nice fix ❤️