File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
components/MarkdownTextBlock/src/TextElements Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public MyCodeBlock(CodeBlock codeBlock, MarkdownConfig config)
3030 border . CornerRadius = _config . Themes . CornerRadius ;
3131 var richTextBlock = new RichTextBlock ( ) ;
3232
33+ #if false
3334 if ( codeBlock is FencedCodeBlock fencedCodeBlock )
3435 {
3536//#if !WINAPPSDK
@@ -68,17 +69,19 @@ public MyCodeBlock(CodeBlock codeBlock, MarkdownConfig config)
6869 }
6970 else
7071 {
71- foreach ( var line in codeBlock . Lines . Lines )
72+ #endif
73+
74+ foreach ( var line in codeBlock . Lines . Lines )
75+ {
76+ var paragraph = new Paragraph ( ) ;
77+ var lineString = line . ToString ( ) ;
78+ if ( ! String . IsNullOrWhiteSpace ( lineString ) )
7279 {
73- var paragraph = new Paragraph ( ) ;
74- var lineString = line . ToString ( ) ;
75- if ( ! String . IsNullOrWhiteSpace ( lineString ) )
76- {
77- paragraph . Inlines . Add ( new Run ( ) { Text = lineString } ) ;
78- }
79- richTextBlock . Blocks . Add ( paragraph ) ;
80+ paragraph . Inlines . Add ( new Run ( ) { Text = lineString } ) ;
8081 }
82+ richTextBlock . Blocks . Add ( paragraph ) ;
8183 }
84+
8285 border . Child = richTextBlock ;
8386 container . Child = border ;
8487 _paragraph . Inlines . Add ( container ) ;
You can’t perform that action at this time.
0 commit comments