|
32 | 32 | "from fastcore.script import call_parse\n", |
33 | 33 | "from fastcore.ansi import ansi2html\n", |
34 | 34 | "\n", |
35 | | - "import multiprocessing,types,traceback\n", |
| 35 | + "import mistletoe,multiprocessing,types,traceback\n", |
36 | 36 | "try:\n", |
37 | 37 | " if sys.platform == 'darwin': multiprocessing.set_start_method(\"fork\")\n", |
38 | 38 | "except RuntimeError: pass # if re-running cell\n", |
|
52 | 52 | "try: from matplotlib_inline.backend_inline import set_matplotlib_formats\n", |
53 | 53 | "except ImportError: set_matplotlib_formats = None\n", |
54 | 54 | "\n", |
| 55 | + "\n", |
55 | 56 | "from execnb.nbio import *\n", |
56 | 57 | "from execnb.nbio import _dict2obj" |
57 | 58 | ] |
|
775 | 776 | " _g = lambda t: ''.join(data[t]) if t in data else None\n", |
776 | 777 | " if d := _g('text/html'): return d\n", |
777 | 778 | " if d := _g('application/javascript'): return f'<script>{d}</script>'\n", |
778 | | - " if d := _g('text/markdown'): return markdown.markdown(d)\n", |
| 779 | + " if d := _g('text/markdown'): return mistletoe.markdown(d)\n", |
779 | 780 | " if d := _g('image/svg+xml'): return d\n", |
780 | 781 | " if d := _g('image/jpeg'): return f'<img src=\"data:image/jpeg;base64,{d}\"/>'\n", |
781 | 782 | " if d := _g('image/png'): return f'<img src=\"data:image/png;base64,{d}\"/>'\n", |
|
0 commit comments