File tree Expand file tree Collapse file tree
packages/xl-pdf-exporter/src/pdf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 10851085 >
10861086 < VIEW
10871087 style = { {
1088- backgroundColor : '#161616' ,
1089- color : '#ffffff' ,
1088+ border : '1px solid #000000' ,
10901089 fontFamily : 'GeistMono' ,
10911090 fontSize : 12 ,
10921091 lineHeight : 1.25 ,
Original file line number Diff line number Diff line change 10931093 >
10941094 < VIEW
10951095 style = { {
1096- backgroundColor : '#161616' ,
1097- color : '#ffffff' ,
1096+ border : '1px solid #000000' ,
10981097 fontFamily : 'GeistMono' ,
10991098 fontSize : 12 ,
11001099 lineHeight : 1.25 ,
Original file line number Diff line number Diff line change @@ -114,7 +114,12 @@ export const pdfBlockMappingForDefaultSchema: BlockMapping<
114114 ) ;
115115 } ,
116116 codeBlock : ( block ) => {
117- const textContent = ( block . content as StyledText < any > [ ] ) [ 0 ] ?. text || "" ;
117+ // Code blocks should always contain a single `StyledText` inline content.
118+ // However, if this is not the case for whatever reason, we can merge the
119+ // text content of all `StyledText` content in them.
120+ const textContent = ( block . content as StyledText < any > [ ] )
121+ . map ( ( item ) => item . text )
122+ . join ( "" ) ;
118123 const lines = textContent . split ( "\n" ) . map ( ( line , index ) => {
119124 const indent = line . match ( / ^ \s * / ) ?. [ 0 ] . length || 0 ;
120125
@@ -135,8 +140,7 @@ export const pdfBlockMappingForDefaultSchema: BlockMapping<
135140 wrap = { false }
136141 style = { {
137142 padding : 24 * PIXELS_PER_POINT ,
138- backgroundColor : "#161616" ,
139- color : "#ffffff" ,
143+ border : "1px solid #000000" ,
140144 lineHeight : 1.25 ,
141145 fontSize : FONT_SIZE * PIXELS_PER_POINT ,
142146 fontFamily : "GeistMono" ,
You can’t perform that action at this time.
0 commit comments