Nested inline code, emoji and mentions disappear inside bold, italic and strikethrough

Offen Anfängerfreundlich
#1,429 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
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript
Bereich
frontend

Rechercherichtung

Beginne im markups-Paket bei BoldSpan.js, ItalicSpan.js und StrikeSpan.js; lies, wie jedes AST-Kindtypen abbildet und wo es für nicht behandelte Kinder null zurückgibt. Reproduziere mit der Parser-Ausgabe für *run yarn build first*, füge dann die fehlenden INLINE_CODE-, EMOJI- und MENTION-Fälle sowie Zeitstempel in StrikeSpan.js hinzu, mit Regressionstests. Fertig bedeutet, dass der verschachtelte Inhalt gerendert wird und bestehende Markup-Tests bestehen; Links innerhalb von italic/strikethrough und Abstürze bei verschachtelter emphasis sind außerhalb des Umfangs.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Description

Nested inline code, emoji and mentions are silently dropped by the markup renderer inside bold, italic and strikethrough.

For example, this message:

*run `yarn build` first*

renders as "run first", with the inline code missing.

Steps to reproduce

  1. Use EmbeddedChat develop at commit 1cb7bb38.
  2. Parse the example above using @rocket.chat/message-parser 0.31.29.
  3. Render the resulting AST through the markups package.
  4. Observe that the parser includes an INLINE_CODE child inside BOLD, but the rendered output drops it.

I also reproduced missing inline code, emoji and mentions inside italic and strikethrough using a local rendering harness.

Expected behaviour

Supported nested inline content should remain visible inside the formatting wrapper.

Environment

  • EmbeddedChat: develop at 1cb7bb38
  • Node.js: 24.0.0
  • Yarn: 3.6.4
  • @rocket.chat/message-parser: 0.31.29

Additional context

BoldSpan.js, ItalicSpan.js and StrikeSpan.js return null for child types they do not explicitly handle.

I have a local fix with regression tests for inline code, emoji and mentions inside these wrappers, plus timestamps inside strikethrough. Links inside italic/strikethrough and the pre-existing CommonJS nested-emphasis crashes remain outside this fix.

Related PRs #1044 and #1139 overlap with some files but address different behaviour.

Verification so far uses local package rendering, not a live Rocket.Chat server or the real chat UI.

Is this a fix you'd welcome a PR for?

Vorherrschende Sprache
JavaScript
Sterne
170
Forks
397
Ø Merge
12 T. 14 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

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 RocketChat/EmbeddedChat

Alle Issues in RocketChat/EmbeddedChat

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

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