mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-03 09:48:31 +08:00
stripHiddenAttributes used the pattern `["'][^"']*["']` for each quoted attribute, which matches an opening quote of either type and stops at the first quote of either type. When a value contained the other quote character — e.g. an apostrophe inside a double-quoted attribute like `title="We'll do it"` — the match terminated at the apostrophe, so the wrong span was removed and the surrounding text was corrupted (e.g. `<Tooltip title="We'll do it" placement="top">` became `<Tooltipll do it" placement="top">`). This surfaced via the github_inline_comment MCP tool: suggestion blocks whose code lines contain quotes were mangled before posting (#1366). Match each quoted form per quote type (`"[^"]*"` and `'[^']*'`), mirroring stripMarkdownLinkTitles, so a value may freely contain the other quote character. The unquoted fallback is unchanged. Closes #1366 Co-authored-by: bymle <229636660+bymle@users.noreply.github.com>