Skip to content

Commit

Permalink
Merge pull request #579 from vidartf/mathjax-server-ext
Browse files Browse the repository at this point in the history
Rely on jupyter-server-mathjax
  • Loading branch information
vidartf committed Apr 11, 2021
2 parents ab9f1bc + 86c28f7 commit 4291b8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nbdime/tests/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_api_merge(http_client, base_url, nbdime_base_url, merge_validator, file

@pytest.mark.timeout(timeout=WEB_TEST_TIMEOUT)
@pytest.mark.gen_test
def test_offline_mathjax(http_client, base_url, nbdime_base_url):
def test_offline_mathjax(http_client, base_url, nbdime_base_url, ioloop_patch):
url = base_url + nbdime_base_url + '/nb-static/mathjax/MathJax.js'
response = yield http_client.fetch(url)
assert response.code == 200
Expand Down
4 changes: 2 additions & 2 deletions nbdime/webapp/nbdimeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from jinja2 import FileSystemLoader, Environment
import nbformat
from jupyter_server.base.handlers import JupyterHandler, APIHandler
from jupyter_server import DEFAULT_STATIC_FILES_PATH
from jupyter_server_mathjax.app import STATIC_ASSETS_PATH
from jupyter_server.utils import url_path_join
from jupyter_server.log import log_request
import requests
Expand Down Expand Up @@ -364,7 +364,7 @@ def make_app(**params):
(r'/api/store', ApiMergeStoreHandler, params),
(r'/api/closetool', ApiCloseHandler, params),
(r'/nb-static/mathjax/(.*)', web.StaticFileHandler, {
'path': os.path.join(DEFAULT_STATIC_FILES_PATH, 'components', 'MathJax')
'path': STATIC_ASSETS_PATH
})
# Static handler will be added automatically
]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
'requests',
'GitPython!=2.1.4, !=2.1.5, !=2.1.6', # For difftool taking git refs
'jupyter_server',
'jupyter_server_mathjax>=0.2.2',
'jinja2>=2.9',
]

Expand Down

0 comments on commit 4291b8c

Please sign in to comment.