Skip to content
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

fix: content_manager was not a trait #691

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -21,7 +21,7 @@ before_install:
- conda create -q -n test-environment -c conda-forge python=$PYTHON_VERSION jupyterlab_pygments==0.1.0 pytest-cov nodejs flake8 ipywidgets matplotlib xeus-cling
- source activate test-environment
install:
- pip install --ignore-installed ".[test]"
- pip install ".[test]"
- cd tests/test_template; pip install .; cd ../../;
script:
- VOILA_TEST_DEBUG=1 VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240
Expand Down
3 changes: 3 additions & 0 deletions voila/exporter.py
Expand Up @@ -20,6 +20,8 @@
from nbconvert.exporters.templateexporter import TemplateExporter
from nbconvert.filters.highlight import Highlight2HTML

from jupyter_server.services.contents.manager import ContentsManager


class VoilaMarkdownRenderer(IPythonRenderer):
"""Custom markdown renderer that inlines images"""
Expand All @@ -39,6 +41,7 @@ class VoilaExporter(HTMLExporter):

base_url = traitlets.Unicode(help="Base url for resources").tag(config=True)
markdown_renderer_class = traitlets.Type('mistune.Renderer').tag(config=True)
contents_manager = traitlets.Instance(ContentsManager)

# The voila exporter overrides the markdown renderer from the HTMLExporter
# to inline images.
Expand Down