Skip to content

Commit dbe8412

Browse files
committed
Allow selection in IV code blocks
1 parent 20ea209 commit dbe8412

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎Telegram/Views/InstantPage.xaml.cs‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,10 +1027,13 @@ private FrameworkElement ProcessPreformatted(PageBlockPreformatted block)
10271027
}
10281028
else
10291029
{
1030-
var text = new TextBlock();
1031-
text.Inlines.Add(plain.Text);
1030+
var paragraph = new Paragraph();
1031+
paragraph.Inlines.Add(plain.Text);
10321032

1033-
ProcessCodeBlock(text.Inlines, plain.Text, block.Language, 0);
1033+
var text = new RichTextBlock();
1034+
text.Blocks.Add(paragraph);
1035+
1036+
ProcessCodeBlock(paragraph.Inlines, plain.Text, block.Language, 0);
10341037

10351038
element.Children.Add(text);
10361039

0 commit comments

Comments
 (0)