[Bug]: Same-document Markdown links break after splitting sections

Aperta
#7,492 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@123XieC ci sta già lavorando.

Dal 12/11/2026.

  • #7493 di @123XieC — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
markdown, python
Ambito
backend

Direzione di ricerca

Start from the production Markdown parser’s section-splitting and link-rewrite path, then inspect the tests for split content and rewritten links. Reproduce with split_content=True, enable_link_rewrite=True, and the reported Setup and Details sections. Done means a unique heading in another emitted file links to that file with its fragment, while same-file and unknown-target fragments keep their spelling.

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

Descrizione

Issue Origin

Reproduced locally through the production Markdown parser using a real Markdown file and a local parse output store.

Bug Description

When an imported Markdown document is split across section files, a link such as [Details](#details) still points to the file containing the link, even if the target heading now lives in a different output file.

Steps to Reproduce
  1. Create a Markdown file with a ## Setup section containing [Details](#details) and a subsequent ## Details section. Make the sections long enough that the parser writes separate files.
  2. Parse the file with split_content=True, enable_link_rewrite=True, and its parent directory as link_rewrite_root.
  3. Open the emitted Setup file. It still contains [Details](#details). In the reproduction, the Details heading is in the sibling Details/Details_1.md.
Expected Behavior

A fragment pointing to a unique heading in another emitted file should refer to that file and retain the fragment. Same-file fragments and unknown targets should retain their original spelling.

Actual Behavior

The fragment-only link is preserved when it needs a path. The intended heading cannot be reached from the Setup file.

Environment

main at 5043e1f3169a29a7abccdc1a7aa8647c79c15428, Python 3.12.16, macOS arm64. The test used local parse artifacts and no model provider. AI investigation, with no human review of the reproduction.

Lingua principale
Python
Stelle
41.8k
Fork
3.4k
Merge medio
19h 29m
PR unite (30g)
500

Preparare l'ambiente

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 volcengine/OpenViking

Tutte le issue di volcengine/OpenViking

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.