Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-nbconvert for 
openSUSE:Factory checked in at 2023-09-25 20:03:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nbconvert (Old)
 and      /work/SRC/openSUSE:Factory/.python-nbconvert.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nbconvert"

Mon Sep 25 20:03:19 2023 rev:27 rq:1113304 version:7.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nbconvert/python-nbconvert.changes        
2023-08-18 19:28:54.339374706 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-nbconvert.new.1770/python-nbconvert.changes  
    2023-09-25 20:59:01.279140186 +0200
@@ -1,0 +2,16 @@
+Sun Sep 24 18:09:21 UTC 2023 - Ben Greiner <[email protected]>
+
+- Update to 7.8.0
+  * MermaidJS 10.3.1, accessibility features, handle MIME #2034
+    (@bollwyvl)
+  * Fix: Prevent error from all whitespace lang string #2036
+    (@Adamtaranto)
+
+-------------------------------------------------------------------
+Sat Aug 26 13:25:22 UTC 2023 - Ben Greiner <[email protected]>
+
+- Update to 7.7.4
+  * Give main tag a height of 100% in css for reveal html #2032
+    (@lkeegan)
+
+-------------------------------------------------------------------

Old:
----
  nbconvert-7.7.3.tar.gz

New:
----
  nbconvert-7.8.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-nbconvert.spec ++++++
--- /var/tmp/diff_new_pack.tnKV1I/_old  2023-09-25 20:59:02.435181949 +0200
+++ /var/tmp/diff_new_pack.tnKV1I/_new  2023-09-25 20:59:02.435181949 +0200
@@ -30,9 +30,9 @@
 %bcond_with libalternatives
 %endif
 # X.X.0 gets abbreviated by pythondistdeps
-%define shortversion 7.7.3
+%define shortversion 7.8
 Name:           python-nbconvert%{psuffix}
-Version:        7.7.3
+Version:        7.8.0
 Release:        0
 Summary:        Conversion of Jupyter Notebooks
 License:        BSD-3-Clause AND MIT

++++++ nbconvert-7.7.3.tar.gz -> nbconvert-7.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/.pre-commit-config.yaml 
new/nbconvert-7.8.0/.pre-commit-config.yaml
--- old/nbconvert-7.7.3/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 
+0100
+++ new/nbconvert-7.8.0/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 
+0100
@@ -19,7 +19,7 @@
       - id: trailing-whitespace
 
   - repo: https://github.com/python-jsonschema/check-jsonschema
-    rev: 0.23.2
+    rev: 0.23.3
     hooks:
       - id: check-github-workflows
 
@@ -31,12 +31,12 @@
           [mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
 
   - repo: https://github.com/psf/black
-    rev: 23.3.0
+    rev: 23.7.0
     hooks:
       - id: black
 
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.0.276
+    rev: v0.0.281
     hooks:
       - id: ruff
         args: ["--fix"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/CHANGELOG.md 
new/nbconvert-7.8.0/CHANGELOG.md
--- old/nbconvert-7.7.3/CHANGELOG.md    2020-02-02 01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/CHANGELOG.md    2020-02-02 01:00:00.000000000 +0100
@@ -2,6 +2,42 @@
 
 <!-- <START NEW CHANGELOG ENTRY> -->
 
+## 7.8.0
+
+([Full 
Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.4...9e8d252f2bf5b4177bbbeb007fd1a489356926ec))
+
+### Enhancements made
+
+- MermaidJS 10.3.1, accessibility features, handle MIME 
[#2034](https://github.com/jupyter/nbconvert/pull/2034) 
([@bollwyvl](https://github.com/bollwyvl))
+
+### Bugs fixed
+
+- Fix: Prevent error from all whitespace lang string 
[#2036](https://github.com/jupyter/nbconvert/pull/2036) 
([@Adamtaranto](https://github.com/Adamtaranto))
+
+### Contributors to this release
+
+([GitHub contributors page for this 
release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-08-16&to=2023-08-29&type=c))
+
+[@Adamtaranto](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AAdamtaranto+updated%3A2023-08-16..2023-08-29&type=Issues)
 | 
[@bollwyvl](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abollwyvl+updated%3A2023-08-16..2023-08-29&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
+## 7.7.4
+
+([Full 
Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.3...bbb095ba24c005ce26f0e8b47f4ddf19a5debe68))
+
+### Bugs fixed
+
+- Give main tag a height of 100% in css for reveal html 
[#2032](https://github.com/jupyter/nbconvert/pull/2032) 
([@lkeegan](https://github.com/lkeegan))
+
+### Maintenance and upkeep improvements
+
+### Contributors to this release
+
+([GitHub contributors page for this 
release](https://github.com/jupyter/nbconvert/graphs/contributors?from=2023-07-25&to=2023-08-16&type=c))
+
+[@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ACarreau+updated%3A2023-07-25..2023-08-16&type=Issues)
 | 
[@lkeegan](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Alkeegan+updated%3A2023-07-25..2023-08-16&type=Issues)
 | 
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Apre-commit-ci+updated%3A2023-07-25..2023-08-16&type=Issues)
+
 ## 7.7.3
 
 ([Full 
Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.2...73fd3b9eb5e364bc86f9407e027d5577c5c8db9e))
@@ -16,8 +52,6 @@
 
 
[@jstorrs](https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ajstorrs+updated%3A2023-07-19..2023-07-25&type=Issues)
 
-<!-- <END NEW CHANGELOG ENTRY> -->
-
 ## 7.7.2
 
 ([Full 
Changelog](https://github.com/jupyter/nbconvert/compare/v7.7.1...1cbb0a46d97f9f0b2a6a0d359ebf9b4b50178c25))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/PKG-INFO new/nbconvert-7.8.0/PKG-INFO
--- old/nbconvert-7.7.3/PKG-INFO        2020-02-02 01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/PKG-INFO        2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: nbconvert
-Version: 7.7.3
+Version: 7.8.0
 Summary: Converting Jupyter Notebooks
 Project-URL: Homepage, https://jupyter.org
 Author-email: Jupyter Development Team <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/_version.py 
new/nbconvert-7.8.0/nbconvert/_version.py
--- old/nbconvert-7.7.3/nbconvert/_version.py   2020-02-02 01:00:00.000000000 
+0100
+++ new/nbconvert-7.8.0/nbconvert/_version.py   2020-02-02 01:00:00.000000000 
+0100
@@ -3,7 +3,7 @@
 from typing import List
 
 # Version string must appear intact for versioning
-__version__ = "7.7.3"
+__version__ = "7.8.0"
 
 # Build up version_info tuple for backwards compatibility
 pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/exporters/base.py 
new/nbconvert-7.8.0/nbconvert/exporters/base.py
--- old/nbconvert-7.7.3/nbconvert/exporters/base.py     2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/exporters/base.py     2020-02-02 
01:00:00.000000000 +0100
@@ -106,7 +106,8 @@
 
     try:
         exporters = entry_points(group="nbconvert.exporters")
-        exporter = [e for e in exporters if e.name == name or e.name == 
name.lower()][0].load()
+        items = [e for e in exporters if e.name == name or e.name == 
name.lower()]
+        exporter = items[0].load()
         if getattr(exporter(config=config), "enabled", True):
             return exporter
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/exporters/html.py 
new/nbconvert-7.8.0/nbconvert/exporters/html.py
--- old/nbconvert-7.7.3/nbconvert/exporters/html.py     2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/exporters/html.py     2020-02-02 
01:00:00.000000000 +0100
@@ -124,7 +124,7 @@
     ).tag(config=True)
 
     mermaid_js_url = Unicode(
-        
"https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.2.3/mermaid.esm.min.mjs";,
+        
"https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.3.1/mermaid.esm.min.mjs";,
         help="""
         URL to load MermaidJS from.
 
@@ -189,6 +189,7 @@
                         "text/html",
                         "text/markdown",
                         "image/svg+xml",
+                        "text/vnd.mermaid",
                         "text/latex",
                         "image/png",
                         "image/jpeg",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/exporters/script.py 
new/nbconvert-7.8.0/nbconvert/exporters/script.py
--- old/nbconvert-7.7.3/nbconvert/exporters/script.py   2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/exporters/script.py   2020-02-02 
01:00:00.000000000 +0100
@@ -39,7 +39,7 @@
         if lang_name not in self._lang_exporters:
             try:
                 exporters = entry_points(group="nbconvert.exporters.script")
-                exporter = [e for e in exporters if e.name == 
lang_name][0].load()
+                exporter = [e for e in exporters if e.name == 
lang_name][0].load()  # noqa
             except (KeyError, IndexError):
                 self._lang_exporters[lang_name] = None
             else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nbconvert-7.7.3/nbconvert/exporters/tests/test_html.py 
new/nbconvert-7.8.0/nbconvert/exporters/tests/test_html.py
--- old/nbconvert-7.7.3/nbconvert/exporters/tests/test_html.py  2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/exporters/tests/test_html.py  2020-02-02 
01:00:00.000000000 +0100
@@ -106,6 +106,42 @@
         (output, resources) = 
HTMLExporter(template_name="classic").from_notebook_node(nb)
         self.assertIn("javascript_output", output)
 
+    def test_mermaid_output(self):
+        nb = v4.new_notebook(
+            cells=[
+                v4.new_code_cell(
+                    outputs=[
+                        v4.new_output(
+                            output_type="display_data",
+                            data={"text/vnd.mermaid": "flowchart LR\na --> b"},
+                        )
+                    ]
+                )
+            ]
+        )
+        (output, resources) = 
HTMLExporter(template_name="lab").from_notebook_node(nb)
+        self.assertIn("""<div class="jp-Mermaid">""", output)
+        self.assertIn("""<pre class="mermaid">""", output)
+
+    def test_mermaid_prerendered_output(self):
+        nb = v4.new_notebook(
+            cells=[
+                v4.new_code_cell(
+                    outputs=[
+                        v4.new_output(
+                            output_type="display_data",
+                            data={
+                                "image/svg+xml": "<svg></svg>",
+                                "text/vnd.mermaid": "flowchart LR\na --> b",
+                            },
+                        )
+                    ]
+                )
+            ]
+        )
+        (output, resources) = 
HTMLExporter(template_name="lab").from_notebook_node(nb)
+        self.assertNotIn("""<div class="jp-Mermaid">""", output)
+
     def test_attachments(self):
         (output, resources) = HTMLExporter(template_name="classic").from_file(
             self._get_notebook(nb_name="attachment.ipynb")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/filters/highlight.py 
new/nbconvert-7.8.0/nbconvert/filters/highlight.py
--- old/nbconvert-7.7.3/nbconvert/filters/highlight.py  2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/filters/highlight.py  2020-02-02 
01:00:00.000000000 +0100
@@ -132,7 +132,7 @@
             source, LatexFormatter(**self.extra_formatter_options), language, 
metadata
         )
         if strip_verbatim:
-            latex = latex.replace(r"\begin{Verbatim}[commandchars=\\\{\}]" + 
"\n", "")  # noqa
+            latex = latex.replace(r"\begin{Verbatim}[commandchars=\\\{\}]" + 
"\n", "")
             return latex.replace("\n\\end{Verbatim}\n", "")
         else:
             return latex
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nbconvert-7.7.3/nbconvert/filters/markdown_mistune.py 
new/nbconvert-7.8.0/nbconvert/filters/markdown_mistune.py
--- old/nbconvert-7.7.3/nbconvert/filters/markdown_mistune.py   2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/filters/markdown_mistune.py   2020-02-02 
01:00:00.000000000 +0100
@@ -299,8 +299,9 @@
                 return self.block_mermaidjs(code)
 
             try:
-                lang = info.strip().split(maxsplit=1)[0]
-                lexer = get_lexer_by_name(lang, stripall=True)
+                if info.strip().split(None, 1):
+                    lang = info.strip().split(maxsplit=1)[0]
+                    lexer = get_lexer_by_name(lang, stripall=True)
             except ClassNotFound:
                 code = f"{lang}\n{code}"
                 lang = None
@@ -398,7 +399,7 @@
                 if mime_type in attachment:
                     return f"data:{mime_type};base64,{attachment[mime_type]}"
             # otherwise we choose the first mimetype we can find
-            default_mime_type = tuple(attachment.keys())[0]
+            default_mime_type = next(iter(attachment.keys()))
             return 
f"data:{default_mime_type};base64,{attachment[default_mime_type]}"
 
         elif self.embed_images:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/nbconvertapp.py 
new/nbconvert-7.8.0/nbconvert/nbconvertapp.py
--- old/nbconvert-7.7.3/nbconvert/nbconvertapp.py       2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/nbconvertapp.py       2020-02-02 
01:00:00.000000000 +0100
@@ -237,12 +237,12 @@
     ).tag(config=True)
 
     examples = Unicode(
-        """
+        f"""
         The simplest way to use nbconvert is
 
         > jupyter nbconvert mynotebook.ipynb --to html
 
-        Options include {formats}.
+        Options include {get_export_names()}.
 
         > jupyter nbconvert --to latex mynotebook.ipynb
 
@@ -275,9 +275,7 @@
             c.NbConvertApp.notebooks = ["my_notebook.ipynb"]
 
         > jupyter nbconvert --config mycfg.py
-        """.format(
-            formats=get_export_names()
-        )
+        """
     )
 
     # Writer specific variables
@@ -331,12 +329,10 @@
 
     export_format = Unicode(
         allow_none=False,
-        help="""The export format to be used, either one of the built-in 
formats
-        {formats}
+        help=f"""The export format to be used, either one of the built-in 
formats
+        {get_export_names()}
         or a dotted object name that represents the import path for an
-        ``Exporter`` class""".format(
-            formats=get_export_names()
-        ),
+        ``Exporter`` class""",
     ).tag(config=True)
 
     notebooks = List(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/nbconvert/preprocessors/sanitize.py 
new/nbconvert-7.8.0/nbconvert/preprocessors/sanitize.py
--- old/nbconvert-7.7.3/nbconvert/preprocessors/sanitize.py     2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/nbconvert/preprocessors/sanitize.py     2020-02-02 
01:00:00.000000000 +0100
@@ -111,7 +111,7 @@
           code:
             Sanitize outputs that could result in code execution
         """
-        if cell.cell_type == "raw":  # noqa
+        if cell.cell_type == "raw":
             # Sanitize all raw cells anyway.
             # Only ones with the text/html mimetype should be emitted
             # but erring on the side of safety maybe.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/pyproject.toml 
new/nbconvert-7.8.0/pyproject.toml
--- old/nbconvert-7.7.3/pyproject.toml  2020-02-02 01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/pyproject.toml  2020-02-02 01:00:00.000000000 +0100
@@ -130,7 +130,7 @@
   "black[jupyter]==23.3.0",
   "mdformat>0.7",
   "mdformat-gfm>=0.3.5",
-  "ruff==0.0.276"
+  "ruff==0.0.281"
 ]
 detached = true
 [tool.hatch.envs.lint.scripts]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nbconvert-7.7.3/share/templates/base/display_priority.j2 
new/nbconvert-7.8.0/share/templates/base/display_priority.j2
--- old/nbconvert-7.7.3/share/templates/base/display_priority.j2        
2020-02-02 01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/share/templates/base/display_priority.j2        
2020-02-02 01:00:00.000000000 +0100
@@ -29,6 +29,9 @@
         {%- elif type == 'text/latex' -%}
             {%- block data_latex -%}
             {%- endblock -%}
+        {%- elif type == 'text/vnd.mermaid' -%}
+            {%- block data_mermaid -%}
+            {%- endblock -%}
         {%- elif type == 'application/javascript' -%}
             {%- block data_javascript -%}
             {%- endblock -%}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nbconvert-7.7.3/share/templates/lab/base.html.j2 
new/nbconvert-7.8.0/share/templates/lab/base.html.j2
--- old/nbconvert-7.7.3/share/templates/lab/base.html.j2        2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/share/templates/lab/base.html.j2        2020-02-02 
01:00:00.000000000 +0100
@@ -169,6 +169,14 @@
 </div>
 {%- endblock data_svg %}
 
+{% block data_mermaid scoped -%}
+<div class="jp-Mermaid">
+<pre class="mermaid">
+{{ output.data['text/vnd.mermaid'].strip() }}
+</pre>
+</div>
+{%- endblock data_mermaid %}
+
 {% block data_html scoped -%}
 <div class="jp-RenderedHTMLCommon jp-RenderedHTML jp-OutputArea-output {{ 
extra_class }}" data-mime-type="text/html">
 {%- if resources.should_sanitize_html %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nbconvert-7.7.3/share/templates/lab/mermaidjs.html.j2 
new/nbconvert-7.8.0/share/templates/lab/mermaidjs.html.j2
--- old/nbconvert-7.7.3/share/templates/lab/mermaidjs.html.j2   2020-02-02 
01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/share/templates/lab/mermaidjs.html.j2   2020-02-02 
01:00:00.000000000 +0100
@@ -1,5 +1,5 @@
 {%- macro mermaid_js(
-url="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.0.2/mermaid.esm.min.mjs";
+url="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.3.1/mermaid.esm.min.mjs";
 ) -%}
 <script type="module">
   document.addEventListener("DOMContentLoaded", async () => {
@@ -9,6 +9,7 @@
       return;
     }
     const mermaid = (await import("{{ url }}")).default;
+    const parser = new DOMParser();
 
     mermaid.initialize({
       maxTextSize: 100000,
@@ -24,39 +25,52 @@
     let _nextMermaidId = 0;
 
     function makeMermaidImage(svg) {
-      const img = document.createElement('img');
-      const maxWidth = svg.match(/max-width: (\d+)/);
-      if (maxWidth && maxWidth[1]) {
-        const width = parseInt(maxWidth[1]);
-        if (width && !Number.isNaN(width) && Number.isFinite(width)) {
-          img.width = width;
-        }
+      const img = document.createElement("img");
+      const doc = parser.parseFromString(svg, "image/svg+xml");
+      const svgEl = doc.querySelector("svg");
+      const { maxWidth } = svgEl?.style || {};
+      const firstTitle = doc.querySelector("title");
+      const firstDesc = doc.querySelector("desc");
+
+      img.setAttribute("src", `data:image/svg+xml,${encodeURIComponent(svg)}`);
+      if (maxWidth) {
+        img.width = parseInt(maxWidth);
       }
-      img.setAttribute('src', `data:image/svg+xml,${encodeURIComponent(svg)}`);
-      return img;
+      if (firstTitle) {
+        img.setAttribute("alt", firstTitle.textContent);
+      }
+      if (firstDesc) {
+        const caption = document.createElement("figcaption");
+        caption.className = "sr-only";
+        caption.textContent = firstDesc.textContent;
+        return [img, caption];
+      }
+      return [img];
     }
 
     async function makeMermaidError(text) {
-      let errorMessage = '';
+      let errorMessage = "";
       try {
         await mermaid.parse(text);
       } catch (err) {
         errorMessage = `${err}`;
       }
 
-      const result = document.createElement('details');
-      const summary = document.createElement('summary');
-      const pre = document.createElement('pre');
-      const code = document.createElement('code');
+      const result = document.createElement("details");
+      result.className = 'jp-RenderedMermaid-Details';
+      const summary = document.createElement("summary");
+      summary.className = 'jp-RenderedMermaid-Summary';
+      const pre = document.createElement("pre");
+      const code = document.createElement("code");
       code.innerText = text;
       pre.appendChild(code);
       summary.appendChild(pre);
       result.appendChild(summary);
 
-      const warning = document.createElement('pre');
+      const warning = document.createElement("pre");
       warning.innerText = errorMessage;
       result.appendChild(warning);
-      return result;
+      return [result];
     }
 
     async function renderOneMarmaid(src) {
@@ -66,30 +80,41 @@
       const el = document.createElement("div");
       el.style.visibility = "hidden";
       document.body.appendChild(el);
-      let result = null;
+      let results = null;
+      let output = null;
       try {
         const { svg } = await mermaid.render(id, raw, el);
-        result = makeMermaidImage(svg);
+        results = makeMermaidImage(svg);
+        output = document.createElement("figure");
+        results.map(output.appendChild, output);
       } catch (err) {
         parent.classList.add("jp-mod-warning");
-        result = await makeMermaidError(raw);
+        results = await makeMermaidError(raw);
+        output = results[0];
       } finally {
         el.remove();
       }
       parent.classList.add("jp-RenderedMermaid");
-      parent.appendChild(result);
+      parent.appendChild(output);
     }
 
     void Promise.all([...diagrams].map(renderOneMarmaid));
   });
 </script>
 <style>
-  .jp-RenderedMarkdown .jp-Mermaid:not(.jp-RenderedMermaid) {
+  .jp-Mermaid:not(.jp-RenderedMermaid) {
     display: none;
   }
-  .jp-RenderedMarkdown .jp-RenderedMermaid.jp-mod-warning {
+
+  .jp-RenderedMermaid {
+    overflow: auto;
+    display: flex;
+  }
+
+  .jp-RenderedMermaid.jp-mod-warning {
     width: auto;
-    padding: 10px;
+    padding: 0.5em;
+    margin-top: 0.5em;
     border: var(--jp-border-width) solid var(--jp-warn-color2);
     border-radius: var(--jp-border-radius);
     color: var(--jp-ui-font-color1);
@@ -97,18 +122,33 @@
     white-space: pre-wrap;
     word-wrap: break-word;
   }
-  .jp-RenderedMarkdown .jp-RenderedMermaid.jp-mod-warning details > pre {
+
+  .jp-RenderedMermaid figure {
+    margin: 0;
+    overflow: auto;
+    max-width: 100%;
+  }
+
+  .jp-RenderedMermaid img {
+    max-width: 100%;
+  }
+
+  .jp-RenderedMermaid-Details > pre {
     margin-top: 1em;
   }
-  .jp-RenderedMarkdown .jp-RenderedMermaid.jp-mod-warning summary {
+
+  .jp-RenderedMermaid-Summary {
     color: var(--jp-warn-color2);
   }
-  .jp-RenderedMarkdown .jp-RenderedMermaid.jp-mod-warning summary > pre {
-    display: inline-block;
-  }
-  .jp-RenderedMermaid > .mermaid {
+
+  .jp-RenderedMermaid:not(.jp-mod-warning) pre {
     display: none;
   }
+
+  .jp-RenderedMermaid-Summary > pre {
+    display: inline-block;
+    white-space: normal;
+  }
 </style>
 <!-- End of mermaid configuration -->
 {%- endmacro %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nbconvert-7.7.3/share/templates/reveal/static/custom_reveal.css 
new/nbconvert-7.8.0/share/templates/reveal/static/custom_reveal.css
--- old/nbconvert-7.7.3/share/templates/reveal/static/custom_reveal.css 
2020-02-02 01:00:00.000000000 +0100
+++ new/nbconvert-7.8.0/share/templates/reveal/static/custom_reveal.css 
2020-02-02 01:00:00.000000000 +0100
@@ -65,6 +65,10 @@
   box-shadow: none;
 }
 
+main {
+  height: 100%;
+}
+
 /* Reveal navigation controls */
 
 .reveal .controls .navigate-left,

Reply via email to