Skip to content

Commit 4c93b60

Browse files
committed
🐛 Fix(quarto_reportview.py): correct function to show a static plot, now working for urls and local files
1 parent c8ad935 commit 4c93b60

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

vuegen/quarto_reportview.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,10 @@ def _generate_image_content(self, image_path: str, alt_text: str = "", width: in
546546
"""
547547
if is_url(image_path):
548548
src = image_path
549+
return f"""![]({src}){{fig-alt={alt_text} width={width} height={height}}}\n"""
549550
else:
550551
src = Path(image_path).resolve()
551-
552-
# Return the image content
553-
return f"""![](/{src}){{fig-alt={alt_text} width={width} height={height}}}\n"""
552+
return f"""![](/{src}){{fig-alt={alt_text} width={width} height={height}}}\n"""
554553

555554
def _show_dataframe(self, dataframe, is_report_static, static_dir: str = STATIC_FILES_DIR) -> List[str]:
556555
"""

0 commit comments

Comments
 (0)