File tree Expand file tree Collapse file tree 4 files changed +27
-2
lines changed
tests/docs/smoke-all/2024/05/29/9713 Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ All changes included in 1.5:
123123- ([ #9635 ] ( https://github.com/quarto-dev/quarto-cli/issues/9635 ) ): Respect ` {shortcodes=false} ` when resolving ` include ` shortcodes.
124124- ([ #9664 ] ( https://github.com/quarto-dev/quarto-cli/pull/9664 ) ): Add ` placeholder ` shortcode to produce placeholder images.
125125- ([ #9665 ] ( https://github.com/quarto-dev/quarto-cli/issues/9665 ) ): Fix issue with key-value arguments of shortcode handlers in code contexts.
126+ - ([ #9793 ] ( https://github.com/quarto-dev/quarto-cli/issues/9793 ) ): ` embed ` shortcode now correctly retrieve svg image from embdedded cell.
126127
127128## Lightbox Images
128129
Original file line number Diff line number Diff line change @@ -1930,9 +1930,15 @@ function mdImageOutput(
19301930 ? ( data as string [ ] ) . join ( "" )
19311931 : data as string ;
19321932
1933- // base64 decode if it's not svg
19341933 const outputFile = join ( options . assets . base_dir , imageFile ) ;
1935- if ( mimeType !== kImageSvg ) {
1934+ if (
1935+ // base64 decode if it's not svg
1936+ mimeType !== kImageSvg ||
1937+ // or if it is encoded svg; this could happen when used in embed context,
1938+ // as Pandoc will generate ipynb with base64 encoded svg data
1939+ // https://github.com/quarto-dev/quarto-cli/issues/9793
1940+ ! / < s v g / . test ( imageText )
1941+ ) {
19361942 const imageData = base64decode ( imageText ) ;
19371943
19381944 // if we are in retina mode, then derive width and height from the image
Original file line number Diff line number Diff line change 1+ ---
2+ format : typst
3+ _quarto :
4+ tests :
5+ typst : null
6+ ---
7+
8+ {{< embed plots.qmd#plot >}}
Original file line number Diff line number Diff line change 1+ ---
2+ title : " Plots"
3+ fig-format : svg
4+ ---
5+
6+ ``` {r}
7+ #| label: plot
8+ plot(1:10)
9+ ```
10+
You can’t perform that action at this time.
0 commit comments