mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
InstantPage blockQuote: nested-blocks payload
Upgrade InstantPageBlock.blockQuote from (text, caption) to (blocks: [InstantPageBlock], caption). Legacy inbound shapes (API pageBlockBlockquote, Postbox "t", FlatBuffers text) lift into [.paragraph(text)]; outbound stays on the legacy wire constructor for empty/single-paragraph quotes and uses pageBlockBlockquoteBlocks otherwise. V1/V2 renderers recurse into child blocks with a fixed 10pt inter-child gap; markdown forward/reverse, entity-expressibility, and preview text updated. pullQuote is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ef7d582849
commit
28763bb92d
10 changed files with 233 additions and 62 deletions
|
|
@ -123,8 +123,9 @@ extension InstantPageBlock {
|
|||
result.append(item.previewText())
|
||||
}
|
||||
return result
|
||||
case let .blockQuote(text, caption):
|
||||
return text.previewText() + caption.previewText()
|
||||
case let .blockQuote(blocks, caption):
|
||||
let body = blocks.map { $0.previewText() }.joined(separator: " ")
|
||||
return body + caption.previewText()
|
||||
case let .pullQuote(text, caption):
|
||||
return text.previewText() + caption.previewText()
|
||||
case .image(_, _, _, _):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue