Skip to content

[Bug]: Copied inline code loses meaningful edge spaces #36711

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Send the literal Markdown Use \ value ` here.` in a chat message, with two spaces on each side of value inside the backticks.
  2. Select the rendered paragraph and copy it.
  3. Paste the plain-text Markdown into a Markdown parser or back into chat.

Expected behavior

The inline code retains its parsed value, " value ", when copied Markdown is parsed again.

Actual behavior

The plain-text payload contains only one space on each side inside the backticks. CommonMark strips those spaces on parsing, leaving "value". HTML retains the original spaces. This is rare data-fidelity loss; CSS collapses spaces visually, so the rendering looks unchanged.

Impact

Minor bug or occasional failure

Version or commit

pingdotgg/main @ 1535f3f

Environment

Linux, Chromium, web client. Provider-independent shared rendered-Markdown copy path, also used by desktop.

Logs or stack traces

Parser/serializer reproduction: expected " value ", received "value". Independently confirmed by Claude Opus 5.5 during the bughunt, including a real ChatMarkdown Range and copy event with DataTransfer. Reproduced again on current main by GPT 6.1 Sol. No system clipboard was accessed.

Workaround

Copy the original Markdown source instead of selecting its rendered paragraph.

Activity

  1. added
    vouch:trusted
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions