Skip to content

Support for graphviz rendering in outputs #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion execnb/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def render_output(out):
if include_imgs:
if d := _g('image/jpeg'): return f'<img src="data:image/jpeg;base64,{d}"/>'
if d := _g('image/png'): return f'<img src="data:image/png;base64,{d}"/>'
if d := _g('image/svg+xml'): return d
if d := _g('text/plain'): return _pre(d)
if d := _g('image/svg+xml'): return d

return ''

Expand Down
2 changes: 1 addition & 1 deletion nbs/02_shell.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,8 @@
" if include_imgs:\n",
" if d := _g('image/jpeg'): return f'<img src=\"data:image/jpeg;base64,{d}\"/>'\n",
" if d := _g('image/png'): return f'<img src=\"data:image/png;base64,{d}\"/>'\n",
" if d := _g('image/svg+xml'): return d\n",
" if d := _g('text/plain'): return _pre(d)\n",
" if d := _g('image/svg+xml'): return d\n",
" \n",
" return ''\n",
"\n",
Expand Down