github / github/copilot-cli

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

未關閉
#1,936 3 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
area:terminal-rendering
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### 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

貢獻指南

開啟貢獻指南

研究方向

Locate the markdown renderer and its strikethrough parsing, then reproduce the reported strings with single tildes inside and outside parentheses. Confirm that single tildes remain literal while double tildes still produce strikethrough, and add or update coverage for both cases if the renderer has tests.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
markdown
領域
cli
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。