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

Abierto Apto para principiantes
#1,429 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
frontend

Línea de trabajo

Empieza en el paquete markups en BoldSpan.js, ItalicSpan.js y StrikeSpan.js; lee cómo cada uno mapea los tipos de hijos del AST y dónde devuelve null para hijos no manejados. Reproduce con la salida del parser para *run yarn build first*, luego añade los casos faltantes de INLINE_CODE, EMOJI y MENTION, más marcas de tiempo en StrikeSpan.js, con pruebas de regresión. Hecho significa que el contenido anidado se renderiza y que las pruebas de markup existentes pasan; los enlaces dentro de italic/strikethrough y los fallos de emphasis anidado están fuera del alcance.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?

Lenguaje dominante
JavaScript
Estrellas
170
Forks
397
Merge medio
12 d 14 h
PR fusionados (30 d)
6

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RocketChat/EmbeddedChat

Todos los issues de RocketChat/EmbeddedChat

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.