Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 17, 2024
1 parent 6b3946a commit eaca92d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions nbconvert/exporters/templateexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,5 +685,3 @@ def _init_resources(self, resources):

def include_tableofcontents(self):
return True


5 changes: 3 additions & 2 deletions nbconvert/filters/markdown_mistune.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ def heading(self, text, level):
self.headings.append((level, text))
return "" # We return an empty string to avoid outputting the headings


def extract_titles_from_markdown_input(markdown_input):
# Markdown_input is a single string with all the markdown content concatenated
# Initiate list of titles
Expand All @@ -523,7 +524,7 @@ def extract_titles_from_markdown_input(markdown_input):
attrs = title["attrs"]
raw_text = children[0]["raw"]
level = attrs["level"]
id = raw_text.replace(' ', '-')
href= "#" + id
id = raw_text.replace(" ", "-")
href = "#" + id
titles_array.append([level, raw_text, id, href])
return titles_array
2 changes: 1 addition & 1 deletion share/templates/lab/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ a.anchor-link {
{{text}}
</a>
</div>
{%- endif -%}
{%- endif -%}
{%- if level==2 -%}
<div class="jp-RenderedHTMLCommon jp-RenderedHTMLTOC-Item-h2">
<a href={{href}}>
Expand Down
1 change: 0 additions & 1 deletion share/templates/lab/static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6800,4 +6800,3 @@ div.jp-Cell-Placeholder-content-2 {
div.jp-Cell-Placeholder-content-3 {
top: 140px;
}

0 comments on commit eaca92d

Please sign in to comment.