Skip to content

Commit

Permalink
Update template name changed in nbconvert development version (#344)
Browse files Browse the repository at this point in the history
* Update template name changed in nbconvert development version

* Get default template name from nbconvert
  • Loading branch information
takluyver authored and mgeier committed Nov 3, 2019
1 parent 5bff8f6 commit 65a33c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/nbsphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@
'text/plain',
)

# The default rst template name is changing in nbconvert 6, so we substitute
# it in to the *extends* directive.
RST_TEMPLATE = """
{% extends 'rst.tpl' %}
{% extends '__RST_DEFAULT_TEMPLATE__' %}
{% macro insert_empty_lines(text) %}
{%- set before, after = text | get_empty_lines %}
Expand Down Expand Up @@ -288,7 +290,7 @@
{% endif %}
{{ super() }}
{% endblock footer %}
"""
""".replace('__RST_DEFAULT_TEMPLATE__', nbconvert.RSTExporter().template_file)


LATEX_PREAMBLE = r"""
Expand Down

0 comments on commit 65a33c2

Please sign in to comment.