Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Visual Editor strips cross-reference ID from inline table caption

Aperta
#977 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
markdown, typescript
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
655
Fork
64
Merge medio
21h
PR unite (30g)
45

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quarto-dev/quarto

Tutte le issue di quarto-dev/quarto

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.