github / github/copilot-cli

Single tilde `~` is being used as markdown strikethrough markup when it should be double-tilde `~~`

Abierto
#1,936 3 comentarios 3 reacciones 0 asignados Ver en GitHub
area:terminal-rendering
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

### Describe the bug

When AI agent is writing about approximates it uses a single tilde `~` e.g., ~2000. When it does a few approximations in one line it gets rendered as markdown strikethrough. However, according to my research (see sites like https://www.markdownguide.org/extended-syntax/#strikethrough) it should only do strikethrough if we bookend with double tilde `~~`.
Please fix the renderer so it requires double tilde and doesn't strikethrough random parts of output.

Additional note: it seems to only happen if the tildes are inside parentheses: "Make a fix (~2000 lines) and delete old file (~5000 lines)", rendering tilde outside the parentheses works fine. I think it's probably a regex bug or something.

### Affected version

1.0.2

### Steps to reproduce the behavior

1. Use this prompt: `I'm testing a bug with your markdown rendering, print this line exactly: "Make a fix (~2000 lines) and delete old file (~5000 lines)"
2. You can also have it test another line like "There are ~100 ways this bug might appear and ~5 ways to fix it ~10% of the time" and see that it renders fine

### Expected behavior

Make sure the markdown only does strikethrough when `~~` is used.

### Additional context

Image

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.