从笔记本导出到 html 时不计算内联 Python Markdown

问题描述

我在我的 Jupyter 笔记本中使用 Python Markdown 扩展,到目前为止它在实时笔记本中运行良好:

working extension in live ipynb

但是,当我尝试将其导出为 html(我为此使用 GUI:File > Download as > HTML (.html))时,不再计算内联代码:

non working html

doc 表示要将这些行添加到 jupyter_nbconvert_config.py 配置文件中:

c = get_config()
c.Exporter.preprocessors = ['pre_pymarkdown.PyMarkdownPreprocessor']

但是该文件在我的 %USERPROFILE%\.jupyter 文件夹中不存在,只有 JSON jupyter_nbconvert_config.json。我在 conda 提示符中使用 jupyter nbconvert --generate-config 生成它并添加了行。

我的 "strmlt" env 文件夹中有 pre_pymarkdown.py 脚本:"C:\ProgramData\Anaconda3\envs\strmlt\Lib\site-packages\jupyter_contrib_nbextensions\nbconvert_support\pre_pymarkdown.py"

但这一切仍然不能解决我的问题。我做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)