# RFE: сохранить блоки с предварительным форматированием в «цитате решения»

**URL:** https://meta.discourse.org/t/rfe-preserve-preformatted-blocks-in-solved-quote/209071
**Category:** Feature
**Tags:** solved
**Created:** [14.Ноябрь.2021 00:12:29 UTC](https://meta.discourse.org/t/rfe-preserve-preformatted-blocks-in-solved-quote/209071 "2021-11-14T00:12:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [14.Ноябрь.2021 00:12:29 UTC](https://meta.discourse.org/t/rfe-preserve-preformatted-blocks-in-solved-quote/209071/1 "2021-11-14T00:12:29Z")

</div>

Лучше всего показать на скриншоте, я думаю:

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/6/a6379f6445a98624d37e481b9a1ef12fc2481562.png)

Здесь ключевая часть ответа — команда для запуска. В цитате она теряет форматирование кода. Я бы предпочёл, чтобы этого не происходило.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [11.Декабрь.2025 16:07:26 UTC](https://meta.discourse.org/t/rfe-preserve-preformatted-blocks-in-solved-quote/209071/2 "2025-12-11T16:07:26Z")

</div>

Это теперь делается отдельно

> <https://github.com/discourse/discourse/pull/36552>
>
> Previously, solution excerpts shown in the OP used PrettyText.excerpt() which st…ripped all HTML formatting - code blocks, images, quotes, and other rich content were reduced to plain text, making technical solutions difficult to read.
> 
> Now the full cooked content is sent to the client, preserving all formatting. The excerpt is displayed in a collapsed state by default with a max-height and gradient fade, expandable via toggle. This keeps the UI compact while allowing users to see properly formatted solutions.
> 
> Changes:
> \- Use answer\_post.cooked instead of PrettyText.excerpt() in topic\_extension.rb
> \- Rewrite SolvedAcceptedAnswer component with self-contained expand/collapse
> \- Add CSS for collapsed state (max-height: 300px with gradient overlay)
> \- Add system specs for code block and image preservation
> 
> \*\*BEFORE\*\*
> 
> \<img width="1488" height="1284" alt="BEFORE" src="https://github.com/user-attachments/assets/ec9e5932-62bb-4b6a-9a15-5efe5af2881c" /\>
> 
> \*\*AFTER\*\*
> 
> \<img width="1488" height="1284" alt="AFTER" src="https://github.com/user-attachments/assets/845bcd66-8abf-445c-9d76-cfbaa6e436a0" /\>
> 
> Internal ref - t/168315

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [11.Декабрь.2025 16:07:32 UTC](https://meta.discourse.org/t/rfe-preserve-preformatted-blocks-in-solved-quote/209071/3 "2025-12-11T16:07:32Z")

</div>


