Skip to content

Code block formatting splits each line into separate blocks when pasting multi-line text (regression in 6.8.0) #30681

@rhavinx

Description

@rhavinx

Steps to reproduce

  1. Since 6.8.0, pasting multi-line text after typing triple backticks ``` results in each line being wrapped in its own separate code block instead of a single contiguous block. Previously, the standard Markdown triple-backtick syntax correctly produced a single multi-line code block.
  2. In the message input box, type ``` then Shift+Enter
  3. Paste any multi-line terminal output or plain text, or even a single line from terminal
  4. Type ``` to close

Expected behaviour

All pasted lines appear inside a single code block.

Actual behaviour

Each line is wrapped in its own individual code block.

Suspected cause
The "Copy and paste formatting to and from HTML" feature introduced in 6.8 may be interpreting newlines as separate block elements during paste. The "Custom AI styles in text editor" feature may also be a factor.

Workaround
Paste text without backticks, select all pasted text, right-click → Formatting → Monospace.

Since I have nowhere else to put this info:
The installation source is from the Arch Linux official repos package extra/telegram-desktop 6.8.0-1

Operating system

Linux (EndeavourOS, KDE Plasma, Wayland)

Version of Telegram Desktop

6.8.0

Installation source

Other (unofficial) source

Crash ID

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions