Skip to content

Commit

Permalink
Apply other suggestions from code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaudinFlorence committed Oct 7, 2024
1 parent 28089fa commit 9720c29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions nbconvert/exporters/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ def from_notebook_node( # type:ignore[explicit-override, override]
markdown_collection = markdown_collection + cell.source + "\n"

resources = self._init_resources(resources)
if resources is None:
resources = {}
resources.update(
{"tableofcontents": extract_titles_from_markdown_input(markdown_collection)}
)
Expand Down Expand Up @@ -356,8 +354,11 @@ def resources_include_url(name):
data = data.replace(b"\n", b"").decode("ascii")
src = f"data:{mime_type};base64,{data}"
return markupsafe.Markup(src)


resources = super()._init_resources(resources)
if resources is None:
resources = {}
resources["theme"] = self.theme
resources["include_css"] = resources_include_css
resources["include_lab_theme"] = resources_include_lab_theme
Expand Down
2 changes: 0 additions & 2 deletions share/templates/lab/base.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
{% from 'celltags.j2' import celltags %}
{% from 'cell_id_anchor.j2' import cell_id_anchor %}

{%- block body_header -%}
{%- endblock body_header -%}

{% block codecell %}
{%- if not cell.outputs -%}
Expand Down

0 comments on commit 9720c29

Please sign in to comment.