`docindex`: no way to create a collapsible-only (no target) TOC node; empty links open a directory listing in the web-based Help Browser

Abierto
#38 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
59/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
matlab, xml

Línea de trabajo

Start by reading resources/helptoc.xsl and trace how docindex turns an empty Markdown link into a tocitem target. Check how the web-based Help Browser handles targetless nodes; the issue notes the Java-based behavior is unverified. Done when a section with children can expand and collapse without opening a directory listing or duplicating the child page’s selection and dropdown indicators.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

In helptoc.md, a section header that should only group child pages is usually written with an empty link:

* [Overview](Overview.md)
  * [Getting Started]()
    * [Setup](Setup.md)

docindex transforms this with resources/helptoc.xsl, which always emits target="{a/@href}":

<tocitem target="Overview.html">Overview
    <tocitem target="">Getting Started
        <tocitem target="Setup.html">Setup</tocitem>

The web-based Help Browser (default from 24b) handle target="" badly: clicking the node navigates to the doc folder itself and shows a directory listing. I think Java-based Help Browser rendered the same node as a collapsible folder, which is the desired behavior, but I haven't been able to verify this.

Current workaround: link each section header to its first child page, e.g.:

* [Overview](Overview.md)
  * [Getting Started](Setup.md)
    * [Setup](Setup.md)

This works by stopping the directory listing, but it has visible side effects in the web-based Help Browser:

  • Double selection highlight: when the page is open, the section header (Getting Started) and its first child (Setup) are both highlighted in blue, because they point to the same target.
  • Extra dropdown on the child: the first child (Setup) now shows an expand/collapse dropdown arrow, as though it had children of its own. It's a leaf page.
  • The header is no longer a pure folder: clicking it opens a page instead of just expanding or collapsing.

See the screenshot below showing this result after the workaround:
Screenshot_AfterWorkaround

Lenguaje dominante
MATLAB
Estrellas
10
Forks
3
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de mathworks/docmaker

Todos los issues de mathworks/docmaker

Issues similares

Más issues de MATLAB

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.