File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1991,7 +1991,7 @@ function mdImageOutput(
19911991 // get the data
19921992 const imageText = Array . isArray ( data )
19931993 ? ( data as string [ ] ) . join ( "" )
1994- : data as string ;
1994+ : ( data as string ) . trim ( ) ;
19951995
19961996 const outputFile = join ( options . assets . base_dir , imageFile ) ;
19971997 if (
@@ -2002,7 +2002,9 @@ function mdImageOutput(
20022002 // https://github.com/quarto-dev/quarto-cli/issues/9793
20032003 ! / < s v g / . test ( imageText )
20042004 ) {
2005- const imageData = base64decode ( imageText ) ;
2005+ // we need to remove the newlines from the base64 encoded data
2006+ // because base64decode doesn't like the multiline-encoded style
2007+ const imageData = base64decode ( imageText . replaceAll ( "\n" , "" ) ) ;
20062008
20072009 // if we are in retina mode, then derive width and height from the image
20082010 if (
You can’t perform that action at this time.
0 commit comments