Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Visual Editor strips cross-reference ID from inline table caption

Abierto
#977 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
64/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
markdown, typescript
Área
tooling

Línea de trabajo

Start by reproducing the round-trip with the provided issue.qmd in the Visual Editor, comparing the inline caption form with the preserved div form. Trace the editor's source serialization for table captions and verify that switching views preserves {#tbl-one} and resolves @tbl-one after saving.

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

Descripción

bug visual-editor vscode
Bug description

Switching a .qmd from source to the Visual Editor (and back) strips the cross-reference ID from a table caption written in the inline form : Caption {#tbl-one}.
After the round-trip the caption becomes : Caption and @tbl-one no longer resolves.

The equivalent div form ::: {#tbl-two} ... ::: is preserved, so the bug is specific to the inline caption attribute syntax.

Originally reported in https://github.com/quarto-dev/quarto-cli/discussions/14514.

Steps to reproduce
  1. Create issue.qmd:

    ---
    title: About
    format: html
    ---
    
    @tbl-one and @tbl-two
    
    | A | B | C |
    |---|---|---|
    | 1 | 2 | 3 |
    
    : Caption {#tbl-one}
    
    ::: {#tbl-two}
    
    | A | B | C |
    |---|---|---|
    | 1 | 2 | 3 |
    
    Caption
    
    :::
    
  2. Open in the Visual Editor, make any edit (or just toggle and save).

  3. Switch back to source.

Actual behavior

The {#tbl-one} attribute is removed from the caption:

| A   | B   | C   |
|-----|-----|-----|
| 1   | 2   | 3   |

: Caption

@tbl-one renders as ?@tbl-one and the cross-reference is broken.
The {#tbl-two} div form survives the round-trip unchanged.

Expected behavior

The Visual Editor should preserve {#tbl-one} on the table caption across round-trips, matching its behaviour for div-wrapped tables.

Your environment
Lenguaje dominante
TypeScript
Estrellas
655
Forks
64
Merge medio
8 h 45 min
PR fusionados (30 d)
36

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 quarto-dev/quarto

Todos los issues de quarto-dev/quarto

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.