Playground Markdown tab: normalise before the no-change check, and match moved paragraphs' keys

Aperta
#173 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
desktop

Direzione di ricerca

Start with ApplyMarkdown and CarryKeys in samples/SIL.TextEditing.Playground/PlaygroundView.cs, then read the review context in #171 and the unchanged-paragraph key requirement in #170. Check how normalization relates to Document.Normalization and how paragraph matching handles moved paragraphs. Done means equivalent composed and decomposed Markdown creates no undo step, and moving a paragraph upward preserves keys for unchanged paragraphs.

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

Descrizione

Follow-ups from the review of #171 (ApplyMarkdown in samples/SIL.TextEditing.Playground/PlaygroundView.cs):

  • Runs are normalised to Document.Normalization after the AreEquivalent no-change check, so Markdown that differs only in composed vs decomposed form records an undo step that changes nothing. Normalise first.
  • CarryKeys matches each new paragraph to the first equivalent old one in order, so moving a paragraph upward drops the keys of the paragraphs it passes. A longest-common-subsequence match would keep them. This matters for the real source mode (#170), whose plan keeps keys of unchanged paragraphs.

🤖 Generated with Claude Code

Lingua principale
C#
Stelle
0
Fork
0
Merge medio
1h 43m
PR unite (30g)
43

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 sillsdev/SIL.TextEditing

Tutte le issue di sillsdev/SIL.TextEditing

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.