bug(commonmark) Header html tags in table cells do not round-trip or preview properly

Offen
#183 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
markdown, typescript
Bereich
frontend, web-dev

Rechercherichtung

Beginne damit, das Problem im Stacks-Editor in den Modi MD und RT mit einer Tabellenzelle zu reproduzieren, die ein h1-HTML-Tag enthält, und untersuche anschließend den commonmark-Konvertierungspfad. Als erledigt gilt die Aufgabe, wenn die Überschrift im RT-Modus korrekt dargestellt wird und die Rückkehr in den MD-Modus die Tabellensyntax beibehält oder sie nicht fehlerhaft verändert, falls Überschriftselemente weiterhin nicht unterstützt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug commonmark

Describe the bug
Header html tags used in table header or body cells end up not previewing properly in RT mode and mangle the table upon round-trip. It works in current editor when saved to the site - renders properly.

To Reproduce

  1. MD mode, create table, add an h1 html tag in any cell around the text
  2. Go to RT mode, observe that the tag has been transformed as a literal
  3. Go back to MD mode and the table syntax is all messed up and mangled

Expected behavior
Ideally we would support header elements in table cells. The GH MD table spec does not mention it, but the current editor and on-side rendering support it. If we decide not to support it, should at least allow round-trip without destroying the table markdup.

Screenshots
demo

Desktop (please complete the following information):
Windows 11 Chrome 103

Additional context

Vorherrschende Sprache
TypeScript
Sterne
442
Forks
60
Ø Merge
4 Std. 5 Min.
Gemergte PRs (30 T.)
11

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus StackExchange/Stacks-Editor

Alle Issues in StackExchange/Stacks-Editor

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.