diff -Nru nbconvert-6.4.4/CONTRIBUTING.md nbconvert-6.5.3/CONTRIBUTING.md --- nbconvert-6.4.4/CONTRIBUTING.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/CONTRIBUTING.md 2022-08-11 11:50:51.000000000 +0000 @@ -4,38 +4,71 @@ [Jupyter Contribution Workflow](https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html) and the [IPython Contributing Guide](https://github.com/ipython/ipython/blob/master/CONTRIBUTING.md). -# Testing +## Testing In order to test all the features of nbconvert you need to have `pandoc` and -`TexLive` installed. +`TexLive` installed. In your environment `pip install -e '.[all]'` will be needed to be able to -run all of the tests and to test all of the features. +run all of the tests and to test all of the features. If you only want to run some of the tests run `pip install -e '.[test]'`. -# Documentation +## Documentation -NbConvert includes a substantial amount of both user and API documentation. +NbConvert includes a substantial amount of both user and API documentation. -We use sphinx to build the API documentation. - -Much of the user documentation is written in Jupyter Notebooks and converted on the fly with nbsphinx. +We use sphinx to build the API documentation. +Much of the user documentation is written in Jupyter Notebooks and converted on the fly with nbsphinx. To build nbconvert's documentation you need to have `pandoc` and -`TexLive` installed. +`TexLive` installed. If you want to build the docs you will need to install the docs dependencies in addition to -the standard dependencies. You can get all of the dependencies by running `pip install -e -'.[all]'` and if you want only those needed to run the docs you can access them with `pip install -e '.[docs]'`. +the standard dependencies. You can get all of the dependencies by running `pip install -e '.[all]'` and if you want only those needed to run the docs you can access them with `pip install -e '.[docs]'`. Full build instructions can be found at [docs/README.md](docs/README.md). +## Code Styling + +`nbconvert` has adopted automatic code formatting so you shouldn't +need to worry too much about your code style. +As long as your code is valid, +the pre-commit hook should take care of how it should look. +`pre-commit` and its associated hooks will automatically be installed when +you run `pip install -e ".[test]"` + +To install `pre-commit` manually, run the following: + +```bash +pip install pre-commit +pre-commit install +``` + +You can invoke the pre-commit hook by hand at any time with: + +```bash +pre-commit run +``` + +which should run any autoformatting on your code +and tell you about any errors it couldn't fix automatically. +You may also install [black integration](https://github.com/psf/black#editor-integration) +into your text editor to format code automatically. + +If you have already committed files before setting up the pre-commit +hook with `pre-commit install`, you can fix everything up using +`pre-commit run --all-files`. You need to make the fixing commit +yourself after that. + +Some of the hooks only run on CI by default, but you can invoke them by +running with the `--hook-stage manual` argument. + # Releasing If you are going to release a version of `nbconvert` you should also be capable -of testing it and building the docs. +of testing it and building the docs. Please follow the instructions in [Testing](#testing) and [Documentation](#documentation) if you are unfamiliar with how to do so. diff -Nru nbconvert-6.4.4/debian/changelog nbconvert-6.5.3/debian/changelog --- nbconvert-6.4.4/debian/changelog 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/changelog 2022-09-28 12:55:13.000000000 +0000 @@ -1,3 +1,24 @@ +nbconvert (6.5.3-1ubuntu1) kinetic; urgency=medium + + * Fix regular expression in patch d/p/0005-Vendor-mistune-0.8.4.patch + (LP: #1991104) + + -- Heinrich Schuchardt Wed, 28 Sep 2022 14:55:13 +0200 + +nbconvert (6.5.3-1) unstable; urgency=medium + + * Package new upstream 6.5.3 (Closes: #1019156). + * Add patch to fix a missing style.css autopkgtest failure. + + -- Julien Puydt Wed, 07 Sep 2022 07:33:48 +0200 + +nbconvert (6.5.1-1) unstable; urgency=medium + + * New upstream release. + * Refresh patches and drop bleach_5.patch (upstream). + + -- Julien Puydt Wed, 10 Aug 2022 14:48:56 +0200 + nbconvert (6.4.4-2) unstable; urgency=medium * Bump standards-version to 4.6.1. diff -Nru nbconvert-6.4.4/debian/control nbconvert-6.5.3/debian/control --- nbconvert-6.4.4/debian/control 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/control 2022-09-28 12:55:13.000000000 +0000 @@ -1,5 +1,6 @@ Source: nbconvert -Maintainer: Debian Python Team +Maintainer: Ubuntu Developers +XSCB-Original-Maintainer: Debian Python Team Uploaders: Julien Puydt , Gordon Ball Section: python Priority: optional @@ -18,6 +19,7 @@ python3-jinja2, python3-jupyter-core, python3-jupyterlab-pygments, + python3-lxml, python3-nbclient, python3-nbformat, python3-nbsphinx , diff -Nru nbconvert-6.4.4/debian/patches/0002-Disable-downloading-CSS-from-the-web-since-we-can-co.patch nbconvert-6.5.3/debian/patches/0002-Disable-downloading-CSS-from-the-web-since-we-can-co.patch --- nbconvert-6.4.4/debian/patches/0002-Disable-downloading-CSS-from-the-web-since-we-can-co.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/0002-Disable-downloading-CSS-from-the-web-since-we-can-co.patch 2022-09-07 05:33:48.000000000 +0000 @@ -10,13 +10,14 @@ --- nbconvert.orig/setup.py +++ nbconvert/setup.py -@@ -144,9 +144,6 @@ - return command.run(self) +@@ -166,10 +166,6 @@ + return CSSFirst --cmdclass['build'] = css_first(build) --cmdclass['sdist'] = css_first(sdist) --cmdclass['develop'] = css_first(develop) - cmdclass['bdist_egg'] = bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled +- +-cmdclass["build"] = css_first(build) +-cmdclass["sdist"] = css_first(sdist) +-cmdclass["develop"] = css_first(develop) + cmdclass["bdist_egg"] = bdist_egg if "bdist_egg" in sys.argv else bdist_egg_disabled - for d, _, _ in os.walk(pjoin(pkg_root, 'templates')): + for d, _, _ in os.walk(pjoin(pkg_root, "templates")): diff -Nru nbconvert-6.4.4/debian/patches/0004-privacy-breaches.patch nbconvert-6.5.3/debian/patches/0004-privacy-breaches.patch --- nbconvert-6.4.4/debian/patches/0004-privacy-breaches.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/0004-privacy-breaches.patch 2022-09-07 05:33:48.000000000 +0000 @@ -26,40 +26,40 @@ --- nbconvert.orig/nbconvert/exporters/html.py +++ nbconvert/nbconvert/exporters/html.py -@@ -97,29 +97,29 @@ - help="If anchor links should be included or not.").tag(config=True) +@@ -100,29 +100,29 @@ + ) require_js_url = Unicode( - "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js", -+ "file:///usr/share/javascript/requirejs/require.min.js", ++ "file:///usr/share/javascript/requirejs/require.min.js", help=""" URL to load require.js from. - Defaults to loading from cdnjs. + Defaults to loading from local directory. - """ + """, ).tag(config=True) mathjax_url = Unicode( - "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS_CHTML-full,Safe", -+ "file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML-full,Safe", ++ "file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML-full,Safe", help=""" URL to load Mathjax from. - Defaults to loading from cdnjs. + Defaults to loading from local directory. - """ + """, ).tag(config=True) jquery_url = Unicode( - "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js", -+ "file:///usr/share/javascript/jquery/jquery.min.js", ++ "file:///usr/share/javascript/jquery/jquery.min.js", help=""" URL to load jQuery from. - Defaults to loading from cdnjs. + Defaults to loading from local directory. - """ + """, ).tag(config=True) --- nbconvert.orig/nbconvert/tests/files/notebook1.html diff -Nru nbconvert-6.4.4/debian/patches/0005-Patch-out-obsolete-grffile-from-latex-template.patch nbconvert-6.5.3/debian/patches/0005-Patch-out-obsolete-grffile-from-latex-template.patch --- nbconvert-6.4.4/debian/patches/0005-Patch-out-obsolete-grffile-from-latex-template.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/0005-Patch-out-obsolete-grffile-from-latex-template.patch 2022-09-07 05:33:48.000000000 +0000 @@ -16,7 +16,7 @@ \fi \usepackage{fancyvrb} % verbatim replacement that allows latex -- \usepackage{grffile} % extends the file name processing of package graphics +- \usepackage{grffile} % extends the file name processing of package graphics - % to support a larger range - \makeatletter % fix for old versions of grffile with XeLaTeX - \@ifpackagelater{grffile}{2019/11/01} diff -Nru nbconvert-6.4.4/debian/patches/0005-Vendor-mistune-0.8.4.patch nbconvert-6.5.3/debian/patches/0005-Vendor-mistune-0.8.4.patch --- nbconvert-6.4.4/debian/patches/0005-Vendor-mistune-0.8.4.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/0005-Vendor-mistune-0.8.4.patch 2022-09-28 12:55:13.000000000 +0000 @@ -451,7 +451,7 @@ + for i, line in enumerate(cells): + for c, cell in enumerate(line): + # de-escape any pipe inside the cell here -+ cells[i][c] = re.sub('\\\\\|', '|', cell) ++ cells[i][c] = re.sub(r'\\\|', '|', cell) + + return cells + @@ -1203,22 +1203,22 @@ + return Markdown(escape=escape, **kwargs)(text) --- nbconvert.orig/nbconvert/filters/markdown_mistune.py +++ nbconvert/nbconvert/filters/markdown_mistune.py -@@ -23,7 +23,7 @@ +@@ -21,7 +21,7 @@ + from cgi import escape as html_escape import bs4 - -import mistune +import nbconvert.filters._mistune as mistune - from pygments import highlight + from pygments.formatters import HtmlFormatter from pygments.lexers import get_lexer_by_name --- nbconvert.orig/setup.py +++ nbconvert/setup.py -@@ -209,7 +209,6 @@ - ) - - setup_args['install_requires'] = [ -- 'mistune>=0.8.1,<2', - 'jinja2>=2.4', - 'pygments>=2.4.1', - 'jupyterlab_pygments', +@@ -242,7 +242,6 @@ + "jupyter_core>=4.7", + "jupyterlab_pygments", + "MarkupSafe>=2.0", +- "mistune>=0.8.1,<2", + "nbclient>=0.5.0", + "nbformat>=5.1", + "packaging", diff -Nru nbconvert-6.4.4/debian/patches/0006-Fix-invalid-escape-sequence-in-docstrings.patch nbconvert-6.5.3/debian/patches/0006-Fix-invalid-escape-sequence-in-docstrings.patch --- nbconvert-6.4.4/debian/patches/0006-Fix-invalid-escape-sequence-in-docstrings.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/0006-Fix-invalid-escape-sequence-in-docstrings.patch 2022-09-07 05:33:48.000000000 +0000 @@ -9,7 +9,7 @@ --- nbconvert.orig/nbconvert/filters/markdown_mistune.py +++ nbconvert/nbconvert/filters/markdown_mistune.py -@@ -85,7 +85,7 @@ +@@ -79,7 +79,7 @@ defined by the MathInlineGrammar. In particular this grabs ``$$...$$``, ``\\[...\\]``, ``\\(...\\)``, ``$...$``, diff -Nru nbconvert-6.4.4/debian/patches/0006-Set-nbsphinx_allow_errors-in-sphinx-conf.patch nbconvert-6.5.3/debian/patches/0006-Set-nbsphinx_allow_errors-in-sphinx-conf.patch --- nbconvert-6.4.4/debian/patches/0006-Set-nbsphinx_allow_errors-in-sphinx-conf.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/0006-Set-nbsphinx_allow_errors-in-sphinx-conf.patch 2022-09-07 05:33:48.000000000 +0000 @@ -8,11 +8,11 @@ --- nbconvert.orig/docs/source/conf.py +++ nbconvert/docs/source/conf.py -@@ -41,6 +41,7 @@ - 'IPython.sphinxext.ipython_console_highlighting', +@@ -40,6 +40,7 @@ + "IPython.sphinxext.ipython_console_highlighting", ] +nbsphinx_allow_errors = True # Add any paths that contain templates here, relative to this directory. - templates_path = ['_templates'] + templates_path = ["_templates"] diff -Nru nbconvert-6.4.4/debian/patches/bleach_5.patch nbconvert-6.5.3/debian/patches/bleach_5.patch --- nbconvert-6.4.4/debian/patches/bleach_5.patch 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/bleach_5.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -Description: add support for bleach 5 -Author: upstream -Forwarded: comes from upstream - ---- nbconvert.orig/nbconvert/preprocessors/sanitize.py -+++ nbconvert/nbconvert/preprocessors/sanitize.py -@@ -2,21 +2,20 @@ - NBConvert Preprocessor for sanitizing HTML rendering of notebooks. - """ - --from bleach import ( -- ALLOWED_ATTRIBUTES, -- ALLOWED_STYLES, -- ALLOWED_TAGS, -- clean, --) --from traitlets import ( -- Any, -- Bool, -- List, -- Set, -- Unicode, --) -+import warnings -+ -+from bleach import ALLOWED_ATTRIBUTES, ALLOWED_TAGS, clean -+from traitlets import Any, Bool, List, Set, Unicode -+ -+from bleach.css_sanitizer import ALLOWED_CSS_PROPERTIES as ALLOWED_STYLES -+from bleach.css_sanitizer import CSSSanitizer -+ -+_USE_BLEACH_CSS_SANITIZER = True -+_USE_BLEACH_STYLES = False -+ - from .base import Preprocessor - -+__all__ = ["SanitizeHTML"] - - class SanitizeHTML(Preprocessor): - -@@ -128,11 +127,17 @@ - """ - Sanitize a string containing raw HTML tags. - """ -- return clean( -- html_str, -+ kwargs = dict( - tags=self.tags, - attributes=self.attributes, -- styles=self.styles, - strip=self.strip, - strip_comments=self.strip_comments, - ) -+ -+ if _USE_BLEACH_CSS_SANITIZER: -+ css_sanitizer = CSSSanitizer(allowed_css_properties=self.styles) -+ kwargs.update(css_sanitizer=css_sanitizer) -+ elif _USE_BLEACH_STYLES: -+ kwargs.update(styles=self.styles) -+ -+ return clean(html_str, **kwargs) ---- nbconvert.orig/setup.py -+++ nbconvert/setup.py -@@ -216,7 +216,7 @@ - 'jupyter_core', - 'nbformat>=4.4', - 'entrypoints>=0.2.2', -- 'bleach', -+ 'bleach', 'tinycss2', - 'pandocfilters>=1.4.1', - 'testpath', - 'defusedxml', diff -Nru nbconvert-6.4.4/debian/patches/fix_missing_classic_style_css.patch nbconvert-6.5.3/debian/patches/fix_missing_classic_style_css.patch --- nbconvert-6.4.4/debian/patches/fix_missing_classic_style_css.patch 1970-01-01 00:00:00.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/fix_missing_classic_style_css.patch 2022-09-07 05:33:48.000000000 +0000 @@ -0,0 +1,8 @@ +Description: fix missing style.css autopkgtest failure +Author: Julien Puydt +Forwarded: https://github.com/jupyter/nbconvert/issues/1358 + +--- /dev/null ++++ nbconvert/share/jupyter/nbconvert/templates/classic/static/style.css +@@ -0,0 +1 @@ ++/* empty - just for autopkgtest success */ diff -Nru nbconvert-6.4.4/debian/patches/series nbconvert-6.5.3/debian/patches/series --- nbconvert-6.4.4/debian/patches/series 2022-07-10 15:07:13.000000000 +0000 +++ nbconvert-6.5.3/debian/patches/series 2022-09-07 05:33:48.000000000 +0000 @@ -1,7 +1,7 @@ +fix_missing_classic_style_css.patch 0002-Disable-downloading-CSS-from-the-web-since-we-can-co.patch 0004-privacy-breaches.patch 0005-Patch-out-obsolete-grffile-from-latex-template.patch 0006-Fix-invalid-escape-sequence-in-docstrings.patch 0005-Vendor-mistune-0.8.4.patch 0006-Set-nbsphinx_allow_errors-in-sphinx-conf.patch -bleach_5.patch diff -Nru nbconvert-6.4.4/docs/api_examples/template_path/make_html.py nbconvert-6.5.3/docs/api_examples/template_path/make_html.py --- nbconvert-6.4.4/docs/api_examples/template_path/make_html.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/api_examples/template_path/make_html.py 2022-08-11 11:50:51.000000000 +0000 @@ -5,17 +5,18 @@ """ import nbformat from traitlets.config import Config + from nbconvert import HTMLExporter nbfile = "quiz_notebook.ipynb" the_ipynb = nbformat.read(nbfile, as_version=4) c = Config() -c.TemplateExporter.template_paths = ['.', './project_templates'] -for template in ['classic', 'classic_clone']: +c.TemplateExporter.template_paths = [".", "./project_templates"] +for template in ["classic", "classic_clone"]: c.HTMLExporter.template_name = template html_exporter = HTMLExporter(config=c) (body, resources) = html_exporter.from_notebook_node(the_ipynb) - with open(f"{template}.html", 'w') as outfile: + with open(f"{template}.html", "w") as outfile: outfile.write(body) print(f"\n{'*'*20}\n{template} succeeds\n{'*'*20}\n") diff -Nru nbconvert-6.4.4/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/conf.json nbconvert-6.5.3/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/conf.json --- nbconvert-6.4.4/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,6 @@ { - "base_template": "base", - "mimetypes": { - "text/html": true - } -} \ No newline at end of file + "base_template": "base", + "mimetypes": { + "text/html": true + } +} diff -Nru nbconvert-6.4.4/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/static/style.css nbconvert-6.5.3/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/static/style.css --- nbconvert-6.4.4/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/static/style.css 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/api_examples/template_path/project_templates/nbconvert/templates/classic_clone/static/style.css 2022-08-11 11:50:51.000000000 +0000 @@ -257,15 +257,24 @@ } } @font-face { - font-family: 'Glyphicons Halflings'; - src: url('../components/bootstrap/fonts/glyphicons-halflings-regular.eot'); - src: url('../components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); + font-family: "Glyphicons Halflings"; + src: url("../components/bootstrap/fonts/glyphicons-halflings-regular.eot"); + src: url("../components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix") + format("embedded-opentype"), + url("../components/bootstrap/fonts/glyphicons-halflings-regular.woff2") + format("woff2"), + url("../components/bootstrap/fonts/glyphicons-halflings-regular.woff") + format("woff"), + url("../components/bootstrap/fonts/glyphicons-halflings-regular.ttf") + format("truetype"), + url("../components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") + format("svg"); } .glyphicon { position: relative; top: 1px; display: inline-block; - font-family: 'Glyphicons Halflings'; + font-family: "Glyphicons Halflings"; font-style: normal; font-weight: normal; line-height: 1; @@ -1300,7 +1309,7 @@ mark, .mark { background-color: #fcf8e3; - padding: .2em; + padding: 0.2em; } .text-left { text-align: left; @@ -1489,7 +1498,7 @@ blockquote footer:before, blockquote small:before, blockquote .small:before { - content: '\2014 \00A0'; + content: "\2014 \00A0"; } .blockquote-reverse, blockquote.pull-right { @@ -1505,7 +1514,7 @@ blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { - content: ''; + content: ""; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, @@ -1513,7 +1522,7 @@ blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { - content: '\00A0 \2014'; + content: "\00A0 \2014"; } address { margin-bottom: 18px; @@ -1603,13 +1612,71 @@ margin-left: 0px; margin-right: 0px; } -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { +.col-xs-1, +.col-sm-1, +.col-md-1, +.col-lg-1, +.col-xs-2, +.col-sm-2, +.col-md-2, +.col-lg-2, +.col-xs-3, +.col-sm-3, +.col-md-3, +.col-lg-3, +.col-xs-4, +.col-sm-4, +.col-md-4, +.col-lg-4, +.col-xs-5, +.col-sm-5, +.col-md-5, +.col-lg-5, +.col-xs-6, +.col-sm-6, +.col-md-6, +.col-lg-6, +.col-xs-7, +.col-sm-7, +.col-md-7, +.col-lg-7, +.col-xs-8, +.col-sm-8, +.col-md-8, +.col-lg-8, +.col-xs-9, +.col-sm-9, +.col-md-9, +.col-lg-9, +.col-xs-10, +.col-sm-10, +.col-md-10, +.col-lg-10, +.col-xs-11, +.col-sm-11, +.col-md-11, +.col-lg-11, +.col-xs-12, +.col-sm-12, +.col-md-12, +.col-lg-12 { position: relative; min-height: 1px; padding-left: 0px; padding-right: 0px; } -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12 { float: left; } .col-xs-12 { @@ -1766,7 +1833,18 @@ margin-left: 0%; } @media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 { float: left; } .col-sm-12 { @@ -1924,7 +2002,18 @@ } } @media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12 { float: left; } .col-md-12 { @@ -2082,7 +2171,18 @@ } } @media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12 { float: left; } .col-lg-12 { @@ -2551,15 +2651,18 @@ border-radius: 2px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -webkit-transition: border-color ease-in-out 0.15s, + box-shadow ease-in-out 0.15s; + -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } .form-control:focus { border-color: #66afe9; outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); } .form-control::-moz-placeholder { color: #999; @@ -3765,11 +3868,15 @@ border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { +.btn-group-vertical + > .btn-group:first-child:not(:last-child) + > .dropdown-toggle { border-bottom-right-radius: 0; border-bottom-left-radius: 0; } -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { +.btn-group-vertical + > .btn-group:last-child:not(:first-child) + > .btn:first-child { border-top-right-radius: 0; border-top-left-radius: 0; } @@ -4353,8 +4460,10 @@ padding: 10px 0px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), + 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), + 0 1px 0 rgba(255, 255, 255, 0.1); margin-top: -1px; margin-bottom: -1px; } @@ -4829,7 +4938,7 @@ } .label { display: inline; - padding: .2em .6em .3em; + padding: 0.2em 0.6em 0.3em; font-size: 75%; font-weight: bold; line-height: 1; @@ -4837,7 +4946,7 @@ text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: .25em; + border-radius: 0.25em; } a.label:hover, a.label:focus { @@ -5126,9 +5235,36 @@ } .progress-striped .progress-bar, .progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: -o-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); background-size: 40px 40px; } .progress.active .progress-bar, @@ -5141,33 +5277,141 @@ background-color: #5cb85c; } .progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: -o-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: -o-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); } .progress-bar-warning { background-color: #f0ad4e; } .progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: -o-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: -o-linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); } .media { margin-top: 15px; @@ -5473,7 +5717,10 @@ border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child, -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { +.panel + > .panel-collapse + > .list-group:first-child + .list-group-item:first-child { border-top: 0; border-top-right-radius: 1px; border-top-left-radius: 1px; @@ -5484,7 +5731,11 @@ border-bottom-right-radius: 1px; border-bottom-left-radius: 1px; } -.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { +.panel + > .panel-heading + + .panel-collapse + > .list-group + .list-group-item:first-child { border-top-right-radius: 0; border-top-left-radius: 0; } @@ -5511,30 +5762,78 @@ border-top-left-radius: 1px; } .panel > .table:first-child > thead:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel + > .table-responsive:first-child + > .table:first-child + > thead:first-child + > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { +.panel + > .table-responsive:first-child + > .table:first-child + > tbody:first-child + > tr:first-child { border-top-left-radius: 1px; border-top-right-radius: 1px; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel + > .table-responsive:first-child + > .table:first-child + > thead:first-child + > tr:first-child + td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel + > .table-responsive:first-child + > .table:first-child + > tbody:first-child + > tr:first-child + td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel + > .table-responsive:first-child + > .table:first-child + > thead:first-child + > tr:first-child + th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { +.panel + > .table-responsive:first-child + > .table:first-child + > tbody:first-child + > tr:first-child + th:first-child { border-top-left-radius: 1px; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel + > .table-responsive:first-child + > .table:first-child + > thead:first-child + > tr:first-child + td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel + > .table-responsive:first-child + > .table:first-child + > tbody:first-child + > tr:first-child + td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel + > .table-responsive:first-child + > .table:first-child + > thead:first-child + > tr:first-child + th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { +.panel + > .table-responsive:first-child + > .table:first-child + > tbody:first-child + > tr:first-child + th:last-child { border-top-right-radius: 1px; } .panel > .table:last-child, @@ -5543,30 +5842,78 @@ border-bottom-left-radius: 1px; } .panel > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tbody:last-child + > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { +.panel + > .table-responsive:last-child + > .table:last-child + > tfoot:last-child + > tr:last-child { border-bottom-left-radius: 1px; border-bottom-right-radius: 1px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tbody:last-child + > tr:last-child + td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tfoot:last-child + > tr:last-child + td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tbody:last-child + > tr:last-child + th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { +.panel + > .table-responsive:last-child + > .table:last-child + > tfoot:last-child + > tr:last-child + th:first-child { border-bottom-left-radius: 1px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tbody:last-child + > tr:last-child + td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tfoot:last-child + > tr:last-child + td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel + > .table-responsive:last-child + > .table:last-child + > tbody:last-child + > tr:last-child + th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { +.panel + > .table-responsive:last-child + > .table:last-child + > tfoot:last-child + > tr:last-child + th:last-child { border-bottom-right-radius: 1px; } .panel > .panel-body + .table, @@ -6304,18 +6651,42 @@ background-color: rgba(0, 0, 0, 0); } .carousel-control.left { - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-image: -webkit-linear-gradient( + left, + rgba(0, 0, 0, 0.5) 0%, + rgba(0, 0, 0, 0.0001) 100% + ); + background-image: -o-linear-gradient( + left, + rgba(0, 0, 0, 0.5) 0%, + rgba(0, 0, 0, 0.0001) 100% + ); + background-image: linear-gradient( + to right, + rgba(0, 0, 0, 0.5) 0%, + rgba(0, 0, 0, 0.0001) 100% + ); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } .carousel-control.right { left: auto; right: 0; - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-image: -webkit-linear-gradient( + left, + rgba(0, 0, 0, 0.0001) 0%, + rgba(0, 0, 0, 0.5) 100% + ); + background-image: -o-linear-gradient( + left, + rgba(0, 0, 0, 0.0001) 0%, + rgba(0, 0, 0, 0.5) 100% + ); + background-image: linear-gradient( + to right, + rgba(0, 0, 0, 0.0001) 0%, + rgba(0, 0, 0, 0.5) 100% + ); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } @@ -6355,10 +6726,10 @@ font-family: serif; } .carousel-control .icon-prev:before { - content: '\2039'; + content: "\2039"; } .carousel-control .icon-next:before { - content: '\203a'; + content: "\203a"; } .carousel-indicators { position: absolute; @@ -6742,9 +7113,18 @@ /* FONT PATH * -------------------------- */ @font-face { - font-family: 'FontAwesome'; - src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0'); - src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../components/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../components/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../components/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); + font-family: "FontAwesome"; + src: url("../components/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0"); + src: url("../components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") + format("embedded-opentype"), + url("../components/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0") + format("woff2"), + url("../components/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0") + format("woff"), + url("../components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0") + format("truetype"), + url("../components/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") + format("svg"); font-weight: normal; font-style: normal; } @@ -6797,9 +7177,9 @@ left: -1.85714286em; } .fa-border { - padding: .2em .25em .15em; + padding: 0.2em 0.25em 0.15em; border: solid 0.08em #eee; - border-radius: .1em; + border-radius: 0.1em; } .fa-pull-left { float: left; @@ -6808,10 +7188,10 @@ float: right; } .fa.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .fa.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } /* Deprecated as of 4.4.0 */ .pull-right { @@ -6821,10 +7201,10 @@ float: left; } .fa.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .fa.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; @@ -9117,15 +9497,15 @@ } /* Flexible box model classes */ /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */ -/* This file is a compatability layer. It allows the usage of flexible box +/* This file is a compatability layer. It allows the usage of flexible box model layouts accross multiple browsers, including older browsers. The newest, universal implementation of the flexible box model is used when available (see -`Modern browsers` comments below). Browsers that are known to implement this +`Modern browsers` comments below). Browsers that are known to implement this new spec completely include: Firefox 28.0+ Chrome 29.0+ - Internet Explorer 11+ + Internet Explorer 11+ Opera 17.0+ Browsers not listed, including Safari, are supported via the styling under the @@ -9715,7 +10095,7 @@ } .list_header { font-weight: bold; - background-color: #EEE; + background-color: #eee; } .list_placeholder { font-weight: bold; @@ -9774,7 +10154,7 @@ [dir="rtl"] .list_item > div input { margin-right: 0; } -.new-file input[type=checkbox] { +.new-file input[type="checkbox"] { visibility: hidden; } .item_name { @@ -9836,7 +10216,7 @@ height: 24px; line-height: 24px; } -.list_item input:not([type=checkbox]) { +.list_item input:not([type="checkbox"]) { padding-top: 3px; padding-bottom: 3px; height: 22px; @@ -9872,7 +10252,7 @@ min-width: 50px; } [dir="rtl"] #button-select-all.btn { - float: right ; + float: right; } #select-all { margin-left: 7px; @@ -9901,16 +10281,16 @@ content: "\f114"; } .folder_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .folder_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .folder_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .folder_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .notebook_icon:before { display: inline-block; @@ -9924,16 +10304,16 @@ top: -1px; } .notebook_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .notebook_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .notebook_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .notebook_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .running_notebook_icon:before { display: inline-block; @@ -9948,16 +10328,16 @@ color: #5cb85c; } .running_notebook_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .running_notebook_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .running_notebook_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .running_notebook_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .file_icon:before { display: inline-block; @@ -9971,16 +10351,16 @@ top: -2px; } .file_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .file_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .file_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .file_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } #notebook_toolbar .pull-right { padding-top: 0px; @@ -10015,7 +10395,7 @@ margin-bottom: 1em; } #running .panel-group .panel .panel-heading { - background-color: #EEE; + background-color: #eee; padding-top: 4px; padding-bottom: 4px; padding-left: 7px; @@ -10097,16 +10477,16 @@ width: 20px; } .dirty-indicator.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator-dirty { display: inline-block; @@ -10118,16 +10498,16 @@ width: 20px; } .dirty-indicator-dirty.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator-dirty.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator-dirty.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator-dirty.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator-clean { display: inline-block; @@ -10139,16 +10519,16 @@ width: 20px; } .dirty-indicator-clean.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator-clean.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator-clean.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator-clean.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator-clean:before { display: inline-block; @@ -10160,16 +10540,16 @@ content: "\f00c"; } .dirty-indicator-clean:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator-clean:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dirty-indicator-clean:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dirty-indicator-clean:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } #filename { font-size: 16pt; @@ -10186,7 +10566,7 @@ } @media not print { #texteditor-backdrop { - background-color: #EEE; + background-color: #eee; } } @media print { @@ -10222,34 +10602,34 @@ http://www.xcolors.net/dl/baskerville-ivorylight and http://www.xcolors.net/dl/euphrasia */ .ansi-black-fg { - color: #3E424D; + color: #3e424d; } .ansi-black-bg { - background-color: #3E424D; + background-color: #3e424d; } .ansi-black-intense-fg { - color: #282C36; + color: #282c36; } .ansi-black-intense-bg { - background-color: #282C36; + background-color: #282c36; } .ansi-red-fg { - color: #E75C58; + color: #e75c58; } .ansi-red-bg { - background-color: #E75C58; + background-color: #e75c58; } .ansi-red-intense-fg { - color: #B22B31; + color: #b22b31; } .ansi-red-intense-bg { - background-color: #B22B31; + background-color: #b22b31; } .ansi-green-fg { - color: #00A250; + color: #00a250; } .ansi-green-bg { - background-color: #00A250; + background-color: #00a250; } .ansi-green-intense-fg { color: #007427; @@ -10258,67 +10638,67 @@ background-color: #007427; } .ansi-yellow-fg { - color: #DDB62B; + color: #ddb62b; } .ansi-yellow-bg { - background-color: #DDB62B; + background-color: #ddb62b; } .ansi-yellow-intense-fg { - color: #B27D12; + color: #b27d12; } .ansi-yellow-intense-bg { - background-color: #B27D12; + background-color: #b27d12; } .ansi-blue-fg { - color: #208FFB; + color: #208ffb; } .ansi-blue-bg { - background-color: #208FFB; + background-color: #208ffb; } .ansi-blue-intense-fg { - color: #0065CA; + color: #0065ca; } .ansi-blue-intense-bg { - background-color: #0065CA; + background-color: #0065ca; } .ansi-magenta-fg { - color: #D160C4; + color: #d160c4; } .ansi-magenta-bg { - background-color: #D160C4; + background-color: #d160c4; } .ansi-magenta-intense-fg { - color: #A03196; + color: #a03196; } .ansi-magenta-intense-bg { - background-color: #A03196; + background-color: #a03196; } .ansi-cyan-fg { - color: #60C6C8; + color: #60c6c8; } .ansi-cyan-bg { - background-color: #60C6C8; + background-color: #60c6c8; } .ansi-cyan-intense-fg { - color: #258F8F; + color: #258f8f; } .ansi-cyan-intense-bg { - background-color: #258F8F; + background-color: #258f8f; } .ansi-white-fg { - color: #C5C1B4; + color: #c5c1b4; } .ansi-white-bg { - background-color: #C5C1B4; + background-color: #c5c1b4; } .ansi-white-intense-fg { - color: #A1A6B2; + color: #a1a6b2; } .ansi-white-intense-bg { - background-color: #A1A6B2; + background-color: #a1a6b2; } .ansi-default-inverse-fg { - color: #FFFFFF; + color: #ffffff; } .ansi-default-inverse-bg { background-color: #000000; @@ -10422,17 +10802,17 @@ top: -1px; left: -1px; width: 5px; - height: calc(100% + 2px); - content: ''; + height: calc(100% + 2px); + content: ""; background: transparent; } div.cell.jupyter-soft-selected { - border-left-color: #E3F2FD; + border-left-color: #e3f2fd; border-left-width: 1px; padding-left: 5px; - border-right-color: #E3F2FD; + border-right-color: #e3f2fd; border-right-width: 1px; - background: #E3F2FD; + background: #e3f2fd; } @media print { div.cell.jupyter-soft-selected { @@ -10450,9 +10830,9 @@ top: -1px; left: -1px; width: 5px; - height: calc(100% + 2px); - content: ''; - background: #42A5F5; + height: calc(100% + 2px); + content: ""; + background: #42a5f5; } @media print { div.cell.selected, @@ -10461,7 +10841,7 @@ } } .edit_mode div.cell.selected { - border-color: #66BB6A; + border-color: #66bb6a; } .edit_mode div.cell.selected:before { position: absolute; @@ -10469,9 +10849,9 @@ top: -1px; left: -1px; width: 5px; - height: calc(100% + 2px); - content: ''; - background: #66BB6A; + height: calc(100% + 2px); + content: ""; + background: #66bb6a; } @media print { .edit_mode div.cell.selected { @@ -10624,7 +11004,7 @@ } /* input_area and input_prompt must match in top border and margin for alignment */ div.input_prompt { - color: #303F9F; + color: #303f9f; border-top: 1px solid transparent; } div.input_area > div.highlight { @@ -10717,7 +11097,7 @@ color: #333333; } .highlight-string { - color: #BA2121; + color: #ba2121; } .highlight-comment { color: #408080; @@ -10727,7 +11107,7 @@ color: #080; } .highlight-atom { - color: #88F; + color: #88f; } .highlight-keyword { color: #008000; @@ -10740,11 +11120,11 @@ color: #f00; } .highlight-operator { - color: #AA22FF; + color: #aa22ff; font-weight: bold; } .highlight-meta { - color: #AA22FF; + color: #aa22ff; } /* previously not defined, copying from default codemirror */ .highlight-def { @@ -10780,7 +11160,7 @@ font-weight: bold; } .cm-s-ipython span.cm-atom { - color: #88F; + color: #88f; } .cm-s-ipython span.cm-number { color: #080; @@ -10792,7 +11172,7 @@ color: #000; } .cm-s-ipython span.cm-operator { - color: #AA22FF; + color: #aa22ff; font-weight: bold; } .cm-s-ipython span.cm-variable-2 { @@ -10806,13 +11186,13 @@ font-style: italic; } .cm-s-ipython span.cm-string { - color: #BA2121; + color: #ba2121; } .cm-s-ipython span.cm-string-2 { color: #f50; } .cm-s-ipython span.cm-meta { - color: #AA22FF; + color: #aa22ff; } .cm-s-ipython span.cm-qualifier { color: #555; @@ -10909,7 +11289,7 @@ background: rgba(240, 240, 240, 0.5); } div.output_prompt { - color: #D84315; + color: #d84315; } /* This class is the outer container of all output sections. */ div.output_area { @@ -11099,38 +11479,38 @@ font-size: 185.7%; margin: 1.08em 0 0 0; font-weight: bold; - line-height: 1.0; + line-height: 1; } .rendered_html h2 { font-size: 157.1%; margin: 1.27em 0 0 0; font-weight: bold; - line-height: 1.0; + line-height: 1; } .rendered_html h3 { font-size: 128.6%; margin: 1.55em 0 0 0; font-weight: bold; - line-height: 1.0; + line-height: 1; } .rendered_html h4 { font-size: 100%; margin: 2em 0 0 0; font-weight: bold; - line-height: 1.0; + line-height: 1; } .rendered_html h5 { font-size: 100%; margin: 2em 0 0 0; font-weight: bold; - line-height: 1.0; + line-height: 1; font-style: italic; } .rendered_html h6 { font-size: 100%; margin: 2em 0 0 0; font-weight: bold; - line-height: 1.0; + line-height: 1; font-style: italic; } .rendered_html h1:first-child { @@ -11462,7 +11842,7 @@ } .end_space { min-height: 100px; - transition: height .2s ease; + transition: height 0.2s ease; } .notebook_app > #header { -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); @@ -11470,7 +11850,7 @@ } @media not print { .notebook_app { - background-color: #EEE; + background-color: #eee; } } kbd { @@ -11507,9 +11887,9 @@ } /* CSS for the cell toolbar */ .celltoolbar { - border: thin solid #CFCFCF; + border: thin solid #cfcfcf; border-bottom: none; - background: #EEE; + background: #eee; border-radius: 2px 2px 0px 0px; width: 100%; height: 29px; @@ -11578,9 +11958,10 @@ border-radius: 2px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -webkit-transition: border-color ease-in-out 0.15s, + box-shadow ease-in-out 0.15s; + -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; height: 30px; padding: 5px 10px; font-size: 12px; @@ -11595,8 +11976,10 @@ .celltoolbar select:focus { border-color: #66afe9; outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); } .celltoolbar select::-moz-placeholder { color: #999; @@ -11664,7 +12047,7 @@ width: 40px; height: 100%; /* Fade to background color of cell toolbar */ - background: linear-gradient(to right, rgba(0, 0, 0, 0), #EEE); + background: linear-gradient(to right, rgba(0, 0, 0, 0), #eee); } .tags-input > * { margin-left: 4px; @@ -11685,9 +12068,10 @@ border-radius: 2px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + -webkit-transition: border-color ease-in-out 0.15s, + box-shadow ease-in-out 0.15s; + -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; height: 30px; padding: 5px 10px; font-size: 12px; @@ -11706,8 +12090,10 @@ .tags-input button:focus { border-color: #66afe9; outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 8px rgba(102, 175, 233, 0.6); } .cell-tag::-moz-placeholder, .tags-input input::-moz-placeholder, @@ -11778,7 +12164,7 @@ background-color: #fff; white-space: nowrap; } -.tags-input input[type=text]:focus { +.tags-input input[type="text"]:focus { outline: none; box-shadow: none; border-color: #ccc; @@ -11936,16 +12322,16 @@ margin-right: -10px; } .dropdown-submenu > a:after.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dropdown-submenu > a:after.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .dropdown-submenu > a:after.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .dropdown-submenu > a:after.pull-right { - margin-left: .3em; + margin-left: 0.3em; } [dir="rtl"] .dropdown-submenu > a:after { float: left; @@ -12054,16 +12440,16 @@ content: "\f040"; } .edit_mode .modal_indicator:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .edit_mode .modal_indicator:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .edit_mode .modal_indicator:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .edit_mode .modal_indicator:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .command_mode .modal_indicator:before { display: inline-block; @@ -12072,19 +12458,19 @@ text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - content: ' '; + content: " "; } .command_mode .modal_indicator:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .command_mode .modal_indicator:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .command_mode .modal_indicator:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .command_mode .modal_indicator:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_idle_icon:before { display: inline-block; @@ -12096,16 +12482,16 @@ content: "\f10c"; } .kernel_idle_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_idle_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_idle_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_idle_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_busy_icon:before { display: inline-block; @@ -12117,16 +12503,16 @@ content: "\f111"; } .kernel_busy_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_busy_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_busy_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_busy_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_dead_icon:before { display: inline-block; @@ -12138,16 +12524,16 @@ content: "\f1e2"; } .kernel_dead_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_dead_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_dead_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_dead_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_disconnected_icon:before { display: inline-block; @@ -12159,16 +12545,16 @@ content: "\f127"; } .kernel_disconnected_icon:before.fa-pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_disconnected_icon:before.fa-pull-right { - margin-left: .3em; + margin-left: 0.3em; } .kernel_disconnected_icon:before.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .kernel_disconnected_icon:before.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .notification_widget { color: #777; @@ -12507,11 +12893,11 @@ background: #f7f7f7; border-top: 1px solid #cfcfcf; border-bottom: 1px solid #cfcfcf; - /* This injects handle bars (a short, wide = symbol) for + /* This injects handle bars (a short, wide = symbol) for the resize handle. */ } div#pager .ui-resizable-handle::after { - content: ''; + content: ""; top: 2px; left: 50%; height: 3px; @@ -12667,7 +13053,7 @@ .dropdown-menu > li > a.pulse, li.pulse > a.dropdown-toggle, li.pulse.open > a.dropdown-toggle { - background-color: #F37626; + background-color: #f37626; color: white; } /** @@ -12825,7 +13211,7 @@ /* see https://github.com/jupyter/notebook/issues/559 */ white-space: normal; } -ul.typeahead-list > li > a.pull-right { +ul.typeahead-list > li > a.pull-right { float: left !important; float: left; } @@ -12869,8 +13255,8 @@ } #find-and-replace #replace-preview .match, #find-and-replace #replace-preview .insert { - background-color: #BBDEFB; - border-color: #90CAF9; + background-color: #bbdefb; + border-color: #90caf9; border-style: solid; border-width: 1px; border-radius: 0px; @@ -12882,13 +13268,13 @@ border-right: none; } #find-and-replace #replace-preview .replace .match { - background-color: #FFCDD2; - border-color: #EF9A9A; + background-color: #ffcdd2; + border-color: #ef9a9a; border-radius: 0px; } #find-and-replace #replace-preview .replace .insert { - background-color: #C8E6C9; - border-color: #A5D6A7; + background-color: #c8e6c9; + border-color: #a5d6a7; border-radius: 0px; } #find-and-replace #replace-preview { @@ -12899,7 +13285,7 @@ padding: 5px 10px; } .terminal-app { - background: #EEE; + background: #eee; } .terminal-app #header { background: #fff; @@ -12932,4 +13318,4 @@ .terminal-app #terminado-container { margin-top: 20px; } -/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file +/*# sourceMappingURL=style.min.css.map */ diff -Nru nbconvert-6.4.4/docs/api_examples/template_path/quiz_notebook.py nbconvert-6.5.3/docs/api_examples/template_path/quiz_notebook.py --- nbconvert-6.4.4/docs/api_examples/template_path/quiz_notebook.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/api_examples/template_path/quiz_notebook.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: @@ -26,11 +25,11 @@ # surface as in Dessler Fig. 4.6. Does adding a second opaque (ε=1) # layer (Dessler Figure 4.7) increase the greenhouse effect, decrease # the greenhouse effect, or leave the greenhouse effect unchanged? -# +# # A. increase -# +# # B. decrease -# +# # C. no change # %% [markdown] ctype="question" qnum="2" @@ -38,15 +37,15 @@ # semi-transparent atmosphere shown below (and seen in your reading), # what would the approximate long-wave atmospheric emissivity ε need to be in # order for $T_g$=320 K, if the average shorwave flux was $I_0=400\ W\,m^{-2}$. (Hint, look at equations 5-6 in the reading). -# +# # A. 0.54 -# +# # B. 0.65 -# +# # C. 0.77 -# +# # D. 0.88 -# +# # E. 0.95 # %% [markdown] ctype="question" qnum="2" @@ -54,7 +53,7 @@ # %% [markdown] ctype="question" qnum="3" # 3. Given a one-layer atmosphere like problem 2, but with $\epsilon=0.8$, $T_G$=306 K, $T_1$=258 K, $I_0$ = 300 $W\,m^{-2}$, calculate the greenouse effect. (choose the closest number) -# +# # A. -121 $W\,m^2$ # # B. +121 $W\,m^2$ @@ -67,7 +66,7 @@ # %% [markdown] ctype="question" qnum="4" # 4. According to the figure in Trenberth et al. 2009 below, how big is the Earth's greenhouse effect? -# +# # A. 85 $W\,m^{-2}$ # # B. 157 $W\,m^{-2}$ diff -Nru nbconvert-6.4.4/docs/autogen_config.py nbconvert-6.5.3/docs/autogen_config.py --- nbconvert-6.4.4/docs/autogen_config.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/autogen_config.py 2022-08-11 11:50:51.000000000 +0000 @@ -8,6 +8,7 @@ """ import os.path + from nbconvert.nbconvertapp import NbConvertApp header = """\ @@ -48,11 +49,25 @@ indir = os.path.dirname(__file__) except NameError: indir = os.path.dirname(os.getcwd()) -destination = os.path.join(indir, 'source/config_options.rst') +destination = os.path.join(indir, "source/config_options.rst") -with open(destination, 'w') as f: +with open(destination, "w") as f: app = NbConvertApp() f.write(header) f.write(app.document_flag_help()) f.write(app.document_alias_help()) f.write(app.document_config_options()) + + +# Workaround until https://github.com/jupyter/nbclient/pull/216 is released +with open(destination) as f: + data = f.read() + +data = data.replace("`CellExecutionError`", "``CellExecutionError``") +data = data.replace("`cell`", "``cell``") +data = data.replace("`cell_index`", "``cell_index``") +data = data.replace("`cell_allows_errors`", "``cell_allows_errors``") +data = data.replace("`notebook`", "``notebook``") + +with open(destination, "w") as f: + f.write(data) diff -Nru nbconvert-6.4.4/docs/environment.yml nbconvert-6.5.3/docs/environment.yml --- nbconvert-6.4.4/docs/environment.yml 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/environment.yml 2022-08-11 11:50:51.000000000 +0000 @@ -2,16 +2,16 @@ channels: - conda-forge dependencies: -- python==3.7 -- pandoc -- nbformat -- jupyter_client -- ipython -- sphinx>=1.5.1 -- sphinx_rtd_theme -- tornado -- entrypoints -- ipykernel -- pip -- pip: - - nbsphinx>=0.7.1 + - python==3.9 + - pandoc + - nbformat + - jupyter_client + - ipython + - sphinx>=1.5.1 + - sphinx_rtd_theme + - tornado + - entrypoints + - ipykernel + - pip + - pip: + - nbsphinx>=0.7.1 diff -Nru nbconvert-6.4.4/docs/README.md nbconvert-6.5.3/docs/README.md --- nbconvert-6.4.4/docs/README.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/README.md 2022-08-11 11:50:51.000000000 +0000 @@ -5,49 +5,49 @@ ## Build Documentation locally -1. Change directory to documentation root: +1. Change directory to documentation root: $ cd docs -2. Create conda env (and install relevant dependencies): +2. Create conda env (and install relevant dependencies): $ conda env create -f environment.yml -3. Activate the newly built conda environment `nbconvert_docs` +3. Activate the newly built conda environment `nbconvert_docs` $ source activate nbconvert_docs -4. Create an editable install for nbconvert with doc dependencies using +4. Create an editable install for nbconvert with doc dependencies using - $ pip install -e '..[docs]' + $ pip install -e '..[docs]' - or if you want, `cd ..` and `pip install . -e`. But then you will need to `cd docs` before - continuing to the next step. + or if you want, `cd ..` and `pip install . -e`. But then you will need to `cd docs` before + continuing to the next step. -5. Build documentation using Makefile for Linux and OS X: +5. Build documentation using Makefile for Linux and OS X: - $ make html + $ make html - or on Windows: + or on Windows: - $ make.bat html + $ make.bat html -6. Display the documentation locally by navigating to - ``build/html/index.html`` in your browser: +6. Display the documentation locally by navigating to + `build/html/index.html` in your browser: - Or alternatively you may run a local server to display - the docs. In Python 3: + Or alternatively you may run a local server to display + the docs. In Python 3: - $ python -m http.server 8000 + $ python -m http.server 8000 - In your browser, go to `http://localhost:8000`. + In your browser, go to `http://localhost:8000`. ## Developing Documentation ### Helpful files and directories -* `conf.py` - Sphinx build configuration file -* `source` directory - source for documentation -* `source/api` directory - source files for generated API documentation -* `autogen_config.py` - Generates configuration of ipynb source files to rst -* `index.rst` - Main landing page of the Sphinx documentation +- `conf.py` - Sphinx build configuration file +- `source` directory - source for documentation +- `source/api` directory - source files for generated API documentation +- `autogen_config.py` - Generates configuration of ipynb source files to rst +- `index.rst` - Main landing page of the Sphinx documentation diff -Nru nbconvert-6.4.4/docs/source/api/nbconvertapp.rst nbconvert-6.5.3/docs/source/api/nbconvertapp.rst --- nbconvert-6.4.4/docs/source/api/nbconvertapp.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/api/nbconvertapp.rst 2022-08-11 11:50:51.000000000 +0000 @@ -22,4 +22,4 @@ .. automethod:: write_single_notebook - .. automethod:: postprocess_single_notebook \ No newline at end of file + .. automethod:: postprocess_single_notebook diff -Nru nbconvert-6.4.4/docs/source/api/writers.rst nbconvert-6.5.3/docs/source/api/writers.rst --- nbconvert-6.4.4/docs/source/api/writers.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/api/writers.rst 2022-08-11 11:50:51.000000000 +0000 @@ -21,4 +21,4 @@ .. autoclass:: FilesWriter -.. autoclass:: StdoutWriter \ No newline at end of file +.. autoclass:: StdoutWriter diff -Nru nbconvert-6.4.4/docs/source/architecture.rst nbconvert-6.5.3/docs/source/architecture.rst --- nbconvert-6.4.4/docs/source/architecture.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/architecture.rst 2022-08-11 11:50:51.000000000 +0000 @@ -19,7 +19,9 @@ This can include operations that take a notebook and return a notebook. For example, that operation could be to execute the notebook as though it were a continuous script; if it were executed ``--in-place`` then it would overwrite the current notebook. Or it could be that we wish to systematically alter the notebook, for example by clearing all output cells. -Format agnostic operations on cell content that do not violate the nbformat spec can be interpreted as a notebook to notebook conversion step; such operations can be performed as part of the preprocessing step. +Format agnostic operations on cell content that do not violate the nbformat +spec can be interpreted as a notebook to notebook conversion step; such +operations can be performed as part of the preprocessing step. But often we want to have the notebook's structured content in a different format. Importantly, in many cases the structure of the notebook should be reflected in the structure of the output, adapted to the output's format. diff -Nru nbconvert-6.4.4/docs/source/changelog.rst nbconvert-6.5.3/docs/source/changelog.rst --- nbconvert-6.4.4/docs/source/changelog.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/changelog.rst 2022-08-11 11:50:51.000000000 +0000 @@ -4,6 +4,15 @@ Changes in nbconvert ==================== +6.5.0 +----- +* Support bleach 5, add packaging and tinycss2 dependencies by @bollwyvl in :ghpull:`1755` +* Drop dependency on testpath. by @anntzer in :ghpull:`1723` +* Adopt pre-commit by @blink1073 in :ghpull:`1744`, :ghpull:`1746`, :ghpull:`1748`, :ghpull:`1749`, :ghpull:`1757` +* Add pytest settings and handle warnings by @blink1073 in :ghpull:`1745` +* Update cli example by @leahecole in :ghpull:`1753` +* Clean up workflows by @blink1073 in :ghpull:`1750` + 6.4.4 ----- * HTMLExporter: Respect the embed_images flag for HTML blocks :ghpull:`1721` @@ -19,7 +28,7 @@ * Add option to embed_images in Markdown cells :ghpull:`1717` * HTMLExporter: Add theme alias and docs :ghpull:`1716` * Add basic support for federated labextensions themes :ghpull:`1703` -* Always hide the collapser element :ghpull:`1712) +* Always hide the collapser element :ghpull:`1712` * Raise pyppeteer requirement to >=1,<1.1 :ghpull:`1711` 6.4.1 @@ -274,23 +283,43 @@ Nbconvert 6.0 is a major release of nbconvert which includes many significant changes. -- Python 2 support was dropped. Currently Python 3.6-3.8 is supported and tested by nbconvert. However, nbconvert 6.0 provides limited support for Python 3.6. nbconvert 6.1 will drop support for Python 3.6. Limited support means we will test and run CI on Python 3.6.12 or higher. Issues that are found only affecting Python 3.6 are not guaranteed to be fixed. We recommend all users of nbconvert use Python 3.7 and higher. +- Python 2 support was dropped. Currently Python 3.6-3.8 is supported and + tested by nbconvert. However, nbconvert 6.0 provides limited support for Python + 3.6. nbconvert 6.1 will drop support for Python 3.6. Limited support means we + will test and run CI on Python 3.6.12 or higher. Issues that are found only + affecting Python 3.6 are not guaranteed to be fixed. We recommend all users of + nbconvert use Python 3.7 and higher. - Unlike previous versions, nbconvert 6.0 relies on the `nbclient `__ package for the execute preprocessor, which allows for asynchronous kernel requests. -- ``template_path`` has become ``template_paths``. If referring to a 5.x style ``.tpl`` template use the full path with the ``template_file`` argument to the file. On the command line the pattern is ``--template-file=``. - -- Nbconvert 6.0 includes a new "webpdf" exporter, which renders notebooks in pdf format through a headless web browser, so that complex outputs such as HTML tables, or even widgets are rendered in the same way as with the HTML exporter and a web browser. - -- The default template applied when exporting to HTML now produces the same DOM structure as JupyterLab, and is styled using JupyterLab's CSS. The pygments theme in use mimics JupyterLab's codemirror mode with the same CSS variables, so that custom JupyterLab themes could be applied. The classic notebook styling can still be enabled with +- ``template_path`` has become ``template_paths``. If referring to a 5.x style + ``.tpl`` template use the full path with the ``template_file`` argument to the + file. On the command line the pattern is ``--template-file=``. + +- Nbconvert 6.0 includes a new "webpdf" exporter, which renders notebooks in + pdf format through a headless web browser, so that complex outputs such as HTML + tables, or even widgets are rendered in the same way as with the HTML exporter + and a web browser. + +- The default template applied when exporting to HTML now produces the same DOM + structure as JupyterLab, and is styled using JupyterLab's CSS. The pygments + theme in use mimics JupyterLab's codemirror mode with the same CSS variables, + so that custom JupyterLab themes could be applied. The classic notebook + styling can still be enabled with .. code-block:: bash jupyter nbconvert --to html --template classic -- Nbconvert 6.0 includes a new system for creating custom templates, which can now be installed as packages. A custom "foobar" template is installed in Jupyter's data directory under ``nbconvert/templates`` and has the form of a directory containing all resources. Templates specify their base template as well as other configuration parameters in a ``conf.json`` at the root of the template directory. +- Nbconvert 6.0 includes a new system for creating custom templates, which can + now be installed as packages. A custom "foobar" template is installed in + Jupyter's data directory under ``nbconvert/templates`` and has the form of a + directory containing all resources. Templates specify their base template as + well as other configuration parameters in a ``conf.json`` at the root of the + template directory. -- The "slideshow" template now makes use of RevealJS version 4. It can now be used with the HTML exporter with +- The "slideshow" template now makes use of RevealJS version 4. It can now be + used with the HTML exporter with .. code-block:: bash @@ -396,17 +425,34 @@ Parallel NBConvert ++++++++++++++++++ -NBConvert ``--execute`` can now be run in parallel via threads, multiprocessing, or async patterns! This means you can now parallelize nbconvert via a bash loop, or a python concurrency pattern and it should be able to execute those notebooks in parallel. - -Kernels have varying support for safe concurrent execution. The ipython kernel (ipykernel version 1.5.2 and higher) should be safe to run concurrently using Python 3. However, the Python 2 ipykernel does not always provide safe concurrent execution and sometimes fails with a socket bind exception. Unlike ipykernel which is maintained by the project, other community-maintained kernels may have varying support for concurrent execution, and these kernels were not tested heavily. +NBConvert ``--execute`` can now be run in parallel via threads, +multiprocessing, or async patterns! This means you can now parallelize +nbconvert via a bash loop, or a python concurrency pattern and it should be +able to execute those notebooks in parallel. + +Kernels have varying support for safe concurrent execution. The ipython kernel +(ipykernel version 1.5.2 and higher) should be safe to run concurrently using +Python 3. However, the Python 2 ipykernel does not always provide safe +concurrent execution and sometimes fails with a socket bind exception. Unlike +ipykernel which is maintained by the project, other community-maintained +kernels may have varying support for concurrent execution, and these kernels +were not tested heavily. Issues for nbconvert can be viewed here: :ghpull:`1018`:, and :ghpull:`1017`: -.. note: We'll keep an eye for issues related to this new capability and try to quickly patch any discovered issues post release. The improvement required touching three projects with separate releases, so if you do find an issue try upgrading dependencies and listing your dependencies for your environment when reporting. +.. note: We'll keep an eye for issues related to this new capability and try to + quickly patch any discovered issues post release. The improvement required + touching three projects with separate releases, so if you do find an issue try + upgrading dependencies and listing your dependencies for your environment when + reporting. Execute Loop Rewrite ++++++++++++++++++++ -This release completely rewrote the execution loop responsible for monitoring kernel messages until cell execution is completed. This removes an error where kernel messages could be dropped if too many were posted too quickly. Furthermore, the change means that messages are not buffered. Now, messages can be logged immediately rather than waiting for the cell to terminate. +This release completely rewrote the execution loop responsible for monitoring +kernel messages until cell execution is completed. This removes an error where +kernel messages could be dropped if too many were posted too quickly. +Furthermore, the change means that messages are not buffered. Now, messages can +be logged immediately rather than waiting for the cell to terminate. See :ghpull:`994`: for exact code changes if you're curious. @@ -493,7 +539,11 @@ jupyter nbconvert --ExecutePreprocessor.store_widget_state=False --to notebook --execute mynotebook.ipynb -This widget rendering is not performed against a browser during execution, so only widget default states or states manipulated via user code will be calculated during execution. ``%%javascript`` cells will execute upon notebook rendering, enabling complex interactions to function as expected when viewed by a UI. +This widget rendering is not performed against a browser during execution, so +only widget default states or states manipulated via user code will be +calculated during execution. ``%%javascript`` cells will execute upon notebook +rendering, enabling complex interactions to function as expected when viewed by +a UI. If you can't view widget results after execution, you may need to select :menuselection:`File --> Trust Notebook` in the menu. @@ -505,21 +555,33 @@ Based on monkey patching required in `papermill `__ the ``run_cell`` code path in the ExecutePreprocessor was reworked to allow for accessing individual message parses without reimplementing the entire function. Now there is a ``process_message`` function which take a ZeroMQ message and applies all of its side-effect updates on the cell/notebook objects before returning the output it generated, if it generated any such output. -The change required a much more extensive test suite covering cell execution as test coverage on the various, sometimes wonky, code paths made improvements and reworks impossible to prove undamaging. Now changes to kernel message processing has much better coverage, so future additions or changes with specs over time will be easier to add. +The change required a much more extensive test suite covering cell execution as +test coverage on the various, sometimes wonky, code paths made improvements and +reworks impossible to prove undamaging. Now changes to kernel message +processing has much better coverage, so future additions or changes with specs +over time will be easier to add. See :ghpull:`905` and :ghpull:`982` for details Out Of Memory Kernel Failure Catches ++++++++++++++++++++++++++++++++++++ -When running out of memory on a machine, if the kernel process was killed by the operating system it would result in a timeout error at best and hang indefinitely at worst. Now regardless of timeout configuration, if the underlying kernel process dies before emitting any messages to the effect an exception will be raised notifying the consumer of the lost kernel within a few seconds. +When running out of memory on a machine, if the kernel process was killed by +the operating system it would result in a timeout error at best and hang +indefinitely at worst. Now regardless of timeout configuration, if the +underlying kernel process dies before emitting any messages to the effect an +exception will be raised notifying the consumer of the lost kernel within a few +seconds. See :ghpull:`959`, :ghpull:`971`, and :ghpull:`998` for details Latex / PDF Template Improvements +++++++++++++++++++++++++++++++++ -The latex template was long overdue for improvements. The default template had a rewrite which makes exports for latex and pdf look a lot better. Code cells in particular render much better with line breaks and styling the more closely matches notebook browser rendering. Thanks t-makaro for the efforts here! +The latex template was long overdue for improvements. The default template had +a rewrite which makes exports for latex and pdf look a lot better. Code cells +in particular render much better with line breaks and styling the more closely +matches notebook browser rendering. Thanks t-makaro for the efforts here! See :ghpull:`992` for details @@ -625,30 +687,50 @@ ``nb.metadata.title`` will be respected ahead of ``nb.metadata.name`` for title assignment. This better matches with the notebook format. -``nb.metadata.filename`` will override the default ``output_filename_template`` when extracting notebook resources in the ``ExtractOutputPreprocessor``. The attribute is helpful for when you want to consistently fix to a particular output filename, especially when you need to set image filenames for your exports. +``nb.metadata.filename`` will override the default ``output_filename_template`` +when extracting notebook resources in the ``ExtractOutputPreprocessor``. The +attribute is helpful for when you want to consistently fix to a particular +output filename, especially when you need to set image filenames for your +exports. The ``raises-exception`` cell tag (``nb.cells[].metadata.tags[raises-exception]``) allows for cell exceptions to not halt execution. The tag is respected in the same way by `nbval `_ and other notebook interfaces. ``nb.metadata.allow_errors`` will apply this rule for all cells. This feature is toggleable with the ``force_raise_errors`` configuration option. -Errors from executing the notebook can be allowed with a ``raises-exception`` tag on a single cell, or the ``allow_errors`` configurable option for all cells. An allowed error will be recorded in notebook output, and execution will continue. +Errors from executing the notebook can be allowed with a ``raises-exception`` +tag on a single cell, or the ``allow_errors`` configurable option for all +cells. An allowed error will be recorded in notebook output, and execution will +continue. If an error occurs when it is not explicitly allowed, a 'CellExecutionError' will be raised. -If ``force_raise_errors`` is True, ``CellExecutionError`` will be raised for any error that occurs while executing the notebook. This overrides both the ``allow_errors`` option and the ``raises-exception`` cell tags. +If ``force_raise_errors`` is True, ``CellExecutionError`` will be raised for +any error that occurs while executing the notebook. This overrides both the +``allow_errors`` option and the ``raises-exception`` cell tags. See :ghpull:`867`, :ghpull:`703`, :ghpull:`685`, :ghpull:`672`, and :ghpull:`684` for implementation changes. Configurable kernel managers when executing notebooks +++++++++++++++++++++++++++++++++++++++++++++++++++++ -The kernel manager can now be optionally passed into the ``ExecutePreprocessor.preprocess`` and the ``executenb`` functions as the keyword argument ``km``. This means that the kernel can be configured as desired before beginning preprocessing. - -This is useful for executing in a context where the kernel has external dependencies that need to be set to non-default values. An example of this might be a Spark kernel where you wish to configure the Spark cluster location ahead of time without building a new kernel. - -Overall the ExecutePreprocessor has been reworked to make it easier to use. Future releases will continue this trend to make this section of the code more inheritable and reusable by others. We encourage you read the source code for this version if you're interested in the detailed improvements. +The kernel manager can now be optionally passed into the +``ExecutePreprocessor.preprocess`` and the ``executenb`` functions as the +keyword argument ``km``. This means that the kernel can be configured as +desired before beginning preprocessing. + +This is useful for executing in a context where the kernel has external +dependencies that need to be set to non-default values. An example of this +might be a Spark kernel where you wish to configure the Spark cluster location +ahead of time without building a new kernel. + +Overall the ExecutePreprocessor has been reworked to make it easier to use. +Future releases will continue this trend to make this section of the code more +inheritable and reusable by others. We encourage you read the source code for +this version if you're interested in the detailed improvements. See :ghpull:`852` for implementation changes. Surfacing exporters in front-ends +++++++++++++++++++++++++++++++++ -Exporters are now exposed for front-ends to consume, including classic notebook. As an example, this means that latex exporter will be made available for latex 'text/latex' media type from the Download As interface. +Exporters are now exposed for front-ends to consume, including classic +notebook. As an example, this means that latex exporter will be made available +for latex 'text/latex' media type from the Download As interface. See :ghpull:`759` and :ghpull:`864` for implementation changes. diff -Nru nbconvert-6.4.4/docs/source/conf.py nbconvert-6.5.3/docs/source/conf.py --- nbconvert-6.4.4/docs/source/conf.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/conf.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # # nbconvert documentation build configuration file, created by # sphinx-quickstart on Tue Jun 9 17:11:30 2015. @@ -18,55 +17,56 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +# sys.path.insert(0, os.path.abspath('.')) # Automatically generate config_options.rst -with open(os.path.join(os.path.dirname(__file__), '..', 'autogen_config.py')) as f: - exec(compile(f.read(), 'autogen_config.py', 'exec'), {}) +with open(os.path.join(os.path.dirname(__file__), "..", "autogen_config.py")) as f: + exec(compile(f.read(), "autogen_config.py", "exec"), {}) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.extlinks', - 'sphinx.ext.intersphinx', - 'sphinx.ext.napoleon', - 'nbsphinx', - 'IPython.sphinxext.ipython_console_highlighting', + "sphinx.ext.autodoc", + "sphinx.ext.extlinks", + "sphinx.ext.intersphinx", + "sphinx.ext.napoleon", + "nbsphinx", + "IPython.sphinxext.ipython_console_highlighting", ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] -source_suffix = ['.rst'] +source_suffix = [".rst"] # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = 'nbconvert' +project = "nbconvert" from datetime import date + year = date.today().year -copyright = '2015-%s, Jupyter Development Team' % year -author = 'Jupyter Development Team' +copyright = "2015-%s, Jupyter Development Team" % year +author = "Jupyter Development Team" -extlinks = {'ghpull': ('https://github.com/jupyter/nbconvert/pull/%s', 'PR #')} +extlinks = {"ghpull": ("https://github.com/jupyter/nbconvert/pull/%s", "PR #")} linkcheck_ignore = [ - 'https://github.com/jupyter/nbconvert/pull/', + "https://github.com/jupyter/nbconvert/pull/", ] # The version info for the project you're documenting, acts as replacement for @@ -74,13 +74,13 @@ # built documents. # # Get information from _version.py and use it to generate version and release -_version_py = '../../nbconvert/_version.py' +_version_py = "../../nbconvert/_version.py" version_ns = {} -exec(compile(open(_version_py).read(), _version_py, 'exec'), version_ns) +exec(compile(open(_version_py).read(), _version_py, "exec"), version_ns) # The short X.Y version. -version = '%i.%i' % version_ns['version_info'][:2] +version = "%i.%i" % version_ns["version_info"][:2] # The full version, including alpha/beta/rc tags. -release = version_ns['__version__'] +release = version_ns["__version__"] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -91,37 +91,37 @@ # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -#exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +# exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The reST default role (used for this markup: `text`) to use for all # documents. -default_role = 'any' +default_role = "any" # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. -#pygments_style = 'sphinx' +# pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False @@ -131,11 +131,12 @@ # Set on_rtd to whether we are building on readthedocs.org. We get this line of # code grabbed from docs.readthedocs.org -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +on_rtd = os.environ.get("READTHEDOCS", None) == "True" if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' + + html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs.org uses their default theme, so no need to specify it @@ -143,156 +144,140 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'sphinx_rtd_theme' +# html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -#html_extra_path = [] +# html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Language to be used for generating the HTML full-text search index. # Sphinx supports the following languages: # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' -#html_search_language = 'en' +# html_search_language = 'en' # A dictionary with options for the search language support, empty by default. # Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} +# html_search_options = {'type': 'default'} # The name of a javascript file (relative to the configuration directory) that # implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' +# html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = 'nbconvertdoc' +htmlhelp_basename = "nbconvertdoc" # -- Options for LaTeX output --------------------------------------------- -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', -} +latex_elements = {} # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'nbconvert.tex', 'nbconvert Documentation', - 'Jupyter Development Team', 'manual'), + (master_doc, "nbconvert.tex", "nbconvert Documentation", "Jupyter Development Team", "manual"), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'nbconvert', 'nbconvert Documentation', - [author], 1) -] +man_pages = [(master_doc, "nbconvert", "nbconvert Documentation", [author], 1)] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -301,26 +286,32 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'nbconvert', 'nbconvert Documentation', - author, 'nbconvert', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "nbconvert", + "nbconvert Documentation", + author, + "nbconvert", + "One line description of project.", + "Miscellaneous", + ), ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False +# texinfo_no_detailmenu = False # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - 'python': ('https://docs.python.org/3.6', None), - 'jinja': ('http://jinja.pocoo.org/docs', None), - 'nbformat': ('https://nbformat.readthedocs.io/en/latest', None), + "python": ("https://docs.python.org/3.6", None), + "jinja": ("http://jinja.pocoo.org/docs", None), + "nbformat": ("https://nbformat.readthedocs.io/en/latest", None), } diff -Nru nbconvert-6.4.4/docs/source/customizing.rst nbconvert-6.5.3/docs/source/customizing.rst --- nbconvert-6.4.4/docs/source/customizing.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/customizing.rst 2022-08-11 11:50:51.000000000 +0000 @@ -4,7 +4,7 @@ Selecting a template -------------------- -Most exporters in nbconvert are subclasses of `TemplateExporter`, and make use of +Most exporters in nbconvert are subclasses of ``TemplateExporter``, and make use of jinja to render notebooks into the destination format. Alternative nbconvert templates can be selected by name from the command line with the diff -Nru nbconvert-6.4.4/docs/source/dejavu.rst nbconvert-6.5.3/docs/source/dejavu.rst --- nbconvert-6.4.4/docs/source/dejavu.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/dejavu.rst 2022-08-11 11:50:51.000000000 +0000 @@ -18,7 +18,10 @@ Configuring the Notebook for slides presentations ------------------------------------------------- -In case the user intends to do a slide presentation out of their Jupyter notebook it's recommended to use the ``reveal`` template. In orders to obtain a better result from it's advised to use the slides metadatas available in the cells: +In case the user intends to do a slide presentation out of their Jupyter +notebook it's recommended to use the ``reveal`` template. In orders to obtain a +better result from it's advised to use the slides metadatas available in the +cells: * In the notebook, select a cell and click on the "Property Inspector menu" diff -Nru nbconvert-6.4.4/docs/source/development_release.rst nbconvert-6.5.3/docs/source/development_release.rst --- nbconvert-6.4.4/docs/source/development_release.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/development_release.rst 2022-08-11 11:50:51.000000000 +0000 @@ -120,4 +120,6 @@ Email googlegroup with update letter ------------------------------------ -Make sure to email jupyter@googlegroups.com with the subject line of "[ANN] NBConvert $VERSION -- ..." and include at least the significant changes, contributors, and individual PR notes (if not many significant changes). +Make sure to email jupyter@googlegroups.com with the subject line of +"[ANN] NBConvert $VERSION -- ..." and include at least the significant changes, +contributors, and individual PR notes (if not many significant changes). diff -Nru nbconvert-6.4.4/docs/source/latex_citations.rst nbconvert-6.5.3/docs/source/latex_citations.rst --- nbconvert-6.4.4/docs/source/latex_citations.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/latex_citations.rst 2022-08-11 11:50:51.000000000 +0000 @@ -13,4 +13,3 @@ .. _nbconvert-examples: https://github.com/jupyter/nbconvert-examples .. _citations example: https://nbviewer.jupyter.org/github/jupyter/nbconvert-examples/blob/master/citations/Tutorial.ipynb - diff -Nru nbconvert-6.4.4/docs/source/need_help.rst nbconvert-6.5.3/docs/source/need_help.rst --- nbconvert-6.4.4/docs/source/need_help.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/need_help.rst 2022-08-11 11:50:51.000000000 +0000 @@ -4,9 +4,9 @@ Technical Support ----------------- -- `GitHub Issues and Bug Reports `_: A - place to report bugs or regressions found for nbconvert -- `Community Technical Support and Discussion - Jupyter Discourse `_: +- `GitHub Issues and Bug Reports `_. A place to report bugs or regressions found for nbconvert + +- `Community Technical Support and Discussion - Jupyter Discourse `_ : A place for installation, configuration, and troubleshooting assistance by the Jupyter community. As a non-profit project with maintainers who are primarily volunteers, we rely on the community for technical support. Please use Discourse to ask questions and share your knowledge. @@ -23,4 +23,4 @@ ----------------- - `Jupyter mailing list `_ -- `Project Jupyter website `_ \ No newline at end of file +- `Project Jupyter website `_ diff -Nru nbconvert-6.4.4/docs/source/removing_cells.rst nbconvert-6.5.3/docs/source/removing_cells.rst --- nbconvert-6.4.4/docs/source/removing_cells.rst 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/docs/source/removing_cells.rst 2022-08-11 11:50:51.000000000 +0000 @@ -57,8 +57,8 @@ This additional example demonstrates using the CLI to remove cells with a certain cell tag .. code-block:: sh - - jupyter nbconvert mynotebook.ipynb -TagRemovePreprocessor.remove_cell_tags='{"remove_cell"}' + + jupyter nbconvert mynotebook.ipynb --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags remove_cell Removing cells using Regular Expressions on cell content -------------------------------------------------------- diff -Nru nbconvert-6.4.4/.git-blame-ignore-revs nbconvert-6.5.3/.git-blame-ignore-revs --- nbconvert-6.4.4/.git-blame-ignore-revs 1970-01-01 00:00:00.000000000 +0000 +++ nbconvert-6.5.3/.git-blame-ignore-revs 2022-08-11 11:50:51.000000000 +0000 @@ -0,0 +1,2 @@ +# Initial pre-commit reformat +68b496b7fcf4cfbffe9e1656ac52400a24cacc45 diff -Nru nbconvert-6.4.4/.github/ISSUE_TEMPLATE/bug_report.md nbconvert-6.5.3/.github/ISSUE_TEMPLATE/bug_report.md --- nbconvert-6.4.4/.github/ISSUE_TEMPLATE/bug_report.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.github/ISSUE_TEMPLATE/bug_report.md 2022-08-11 11:50:51.000000000 +0000 @@ -13,4 +13,5 @@ + **Nbconvert version:** diff -Nru nbconvert-6.4.4/.github/ISSUE_TEMPLATE/feature_request.md nbconvert-6.5.3/.github/ISSUE_TEMPLATE/feature_request.md --- nbconvert-6.4.4/.github/ISSUE_TEMPLATE/feature_request.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.github/ISSUE_TEMPLATE/feature_request.md 2022-08-11 11:50:51.000000000 +0000 @@ -5,8 +5,6 @@ - - diff -Nru nbconvert-6.4.4/.github/ISSUE_TEMPLATE/question.md nbconvert-6.5.3/.github/ISSUE_TEMPLATE/question.md --- nbconvert-6.4.4/.github/ISSUE_TEMPLATE/question.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.github/ISSUE_TEMPLATE/question.md 2022-08-11 11:50:51.000000000 +0000 @@ -1,7 +1,7 @@ --- name: Question about: If you need some help -labels: question +labels: question --- If you have a question, you can file an issue here or diff -Nru nbconvert-6.4.4/.github/workflows/docs.yml nbconvert-6.5.3/.github/workflows/docs.yml --- nbconvert-6.4.4/.github/workflows/docs.yml 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.github/workflows/docs.yml 2022-08-11 11:50:51.000000000 +0000 @@ -1,17 +1,20 @@ -name: Generate Docs +name: Docs on: push: branches: [main] pull_request: - branches: [main] + +concurrency: + group: docs-${{ github.ref }} + cancel-in-progress: true jobs: generate-docs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.7', '3.9', '3.10' ] + python-version: ["3.7", "3.10"] steps: - name: Check out repository code uses: actions/checkout@v2 @@ -23,19 +26,7 @@ # pandoc is not up to date in the ubuntu repos, so we install directly wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb - - name: Install Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x64' - - name: Cache pip on Linux - uses: actions/cache@v2 - if: startsWith(runner.os, 'Linux') - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Install run: pip install -v ".[all]" - name: List installed packages @@ -43,20 +34,16 @@ pip freeze pip check - name: Build HTML docs - env: - PYTHONWARNINGS: default run: | - python setup.py build_sphinx -b html + cd docs + make html SPHINXOPTS="-W" - name: Upload HTML uses: actions/upload-artifact@v2 with: name: html path: build/sphinx/html - name: Build PDF docs - env: - PYTHONWARNINGS: default run: | - python -Wd setup.py build_sphinx -b latex cd docs make latexpdf - name: Upload PDF @@ -65,4 +52,6 @@ name: pdf path: docs/build/latex/nbconvert.pdf - name: Check links - run: python setup.py build_sphinx -b linkcheck + run: | + cd docs + make linkcheck diff -Nru nbconvert-6.4.4/.github/workflows/tests.yml nbconvert-6.5.3/.github/workflows/tests.yml --- nbconvert-6.4.4/.github/workflows/tests.yml 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.github/workflows/tests.yml 2022-08-11 11:50:51.000000000 +0000 @@ -2,22 +2,28 @@ on: push: - branches: [main] + branches: [main, 6.x] pull_request: - branches: [main] + +concurrency: + group: tests-${{ github.ref }} + cancel-in-progress: true jobs: run-tests: runs-on: ${{ matrix.os }} strategy: matrix: - os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: [ '3.7', '3.8', '3.9', '3.10', 'pypy-3.7'] - exclude: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.7", "3.10"] + include: - os: "windows-latest" - python-version: "pypy-3.7" - - os: "macos-latest" python-version: "3.8" + - os: "macos-latest" + python-version: "3.9" + - os: "ubuntu-latest" + python-version: "pypy-3.8" + fail-fast: false steps: - name: Check out repository code uses: actions/checkout@v2 @@ -31,14 +37,16 @@ sudo apt-get install texlive-plain-generic inkscape texlive-xetex # pandoc is not up to date in the ubuntu repos, so we install directly - wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb && sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb - name: Install package dependencies + shell: bash run: | - pip install codecov - pip install -e ".[execute,serve,test]" - pip install check-manifest + pip install codecov --user + pip install -e ".[execute,serve,test]" --user python -m ipykernel.kernelspec --user + # many things installed in --users need this to be in $PATH + echo "/Users/runner/.local/bin" >> $GITHUB_PATH - name: List installed packages run: | @@ -47,25 +55,105 @@ - name: Run tests with coverage if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }} - env: - PYTHONWARNINGS: default + shell: bash run: | - check-manifest --ignore "share/**" # See https://github.com/pyppeteer/pyppeteer/pull/321 - pip install -U websockets - # cd so we test the install, not the repo - cd $HOME - pytest --cov nbconvert -v --pyargs nbconvert + pip install -U websockets --user + python -m pytest --cov nbconvert -vv - name: Run tests on pypy and Windows if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(runner.os, 'Windows') }} shell: bash run: | - # cd so we test the install, not the repo - cd $HOME # See https://github.com/pyppeteer/pyppeteer/pull/321 - pip install -U websockets - pytest -v --pyargs nbconvert + pip install -U websockets --user + python -m pytest -vv - name: Code coverage run: codecov + + # Run "pre-commit run --all-files --hook-stage=manual" + pre-commit: + runs-on: ubuntu-20.04 + timeout-minutes: 5 + steps: + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: pre-commit/action@v2.0.0 + with: + extra_args: --all-files --hook-stage=manual + - name: Help message if pre-commit fail + if: ${{ failure() }} + run: | + echo "You can install pre-commit hooks to automatically run formatting" + echo "on each commit with:" + echo " pre-commit install" + echo "or you can run by hand on staged files with" + echo " pre-commit run" + echo "or after-the-fact on already committed files with" + echo " pre-commit run --all-files --hook-stage=manual" + + check_manifest: + timeout-minutes: 20 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Check Manifest + run: | + pip install check-manifest + check-manifest --ignore "share/**" + + test_minimum_versions: + name: Test Minimum Versions + timeout-minutes: 20 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + with: + python_version: "3.7" + - name: Install miniumum versions + uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1 + - name: Run the unit tests + run: | + pytest -vv -W default || pytest -vv -W default --lf + + test_prereleases: + name: Test Prereleases + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install the Python dependencies + run: | + pip install --pre -e ".[test]" + - name: List installed packages + run: | + pip freeze + pip check + - name: Run the tests + run: | + pytest -vv || pytest -vv --lf + + make_sdist: + name: Make SDist + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v2 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1 + + test_sdist: + runs-on: ubuntu-latest + needs: [make_sdist] + name: Install from SDist and Test + timeout-minutes: 20 + steps: + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 diff -Nru nbconvert-6.4.4/.gitignore nbconvert-6.5.3/.gitignore --- nbconvert-6.4.4/.gitignore 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.gitignore 2022-08-11 11:50:51.000000000 +0000 @@ -41,4 +41,4 @@ share/jupyter/nbconvert/templates/lab/static/index.css share/jupyter/nbconvert/templates/lab/static/theme-dark.css share/jupyter/nbconvert/templates/lab/static/theme-light.css - +share/jupyter/nbconvert/templates/classic/static/style.css diff -Nru nbconvert-6.4.4/.mailmap nbconvert-6.5.3/.mailmap --- nbconvert-6.4.4/.mailmap 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/.mailmap 2022-08-11 11:50:51.000000000 +0000 @@ -26,7 +26,7 @@ David P. Sanders David P. Sanders David Warde-Farley David Warde-Farley <> Doug Blank Doug Blank -Eugene Van den Bulke Eugene Van den Bulke +Eugene Van den Bulke Eugene Van den Bulke Evan Patterson Evan Patterson Evan Patterson diff -Nru nbconvert-6.4.4/MANIFEST.in nbconvert-6.5.3/MANIFEST.in --- nbconvert-6.4.4/MANIFEST.in 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/MANIFEST.in 2022-08-11 11:50:51.000000000 +0000 @@ -5,18 +5,23 @@ include MANIFEST.in include nbconvert/templates/skeleton/Makefile include nbconvert/tests/README.md +include pyproject.toml +include setup.py # Documentation graft docs exclude docs/\#* exclude .readthedocs.yml exclude codecov.yml +exclude .pre-commit-config.yaml +exclude .git-blame-ignore-revs +exclude .prettierignore # Examples graft examples # docs subdirs we want to skip -prune docs/build +prune docs/_build prune docs/gh-pages prune docs/dist diff -Nru nbconvert-6.4.4/nbconvert/conftest.py nbconvert-6.5.3/nbconvert/conftest.py --- nbconvert-6.4.4/nbconvert/conftest.py 1970-01-01 00:00:00.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/conftest.py 2022-08-11 11:50:51.000000000 +0000 @@ -0,0 +1,5 @@ +import asyncio +import os + +if os.name == "nt": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) diff -Nru nbconvert-6.4.4/nbconvert/exporters/asciidoc.py nbconvert-6.5.3/nbconvert/exporters/asciidoc.py --- nbconvert-6.4.4/nbconvert/exporters/asciidoc.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/asciidoc.py 2022-08-11 11:50:51.000000000 +0000 @@ -14,38 +14,39 @@ Exports to an ASCIIDoc document (.asciidoc) """ - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.asciidoc' + return ".asciidoc" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'asciidoc' + return "asciidoc" - output_mimetype = 'text/asciidoc' + output_mimetype = "text/asciidoc" export_from_notebook = "AsciiDoc" - @default('raw_mimetypes') + @default("raw_mimetypes") def _raw_mimetypes_default(self): - return ['text/asciidoc/', 'text/markdown', 'text/html', ''] + return ["text/asciidoc/", "text/markdown", "text/html", ""] @property def default_config(self): - c = Config({ - 'NbConvertBase': { - 'display_data_priority': ['text/html', - 'text/markdown', - 'image/svg+xml', - 'image/png', - 'image/jpeg', - 'text/plain', - 'text/latex' - ] - }, - 'ExtractOutputPreprocessor': {'enabled': True}, - 'HighlightMagicsPreprocessor': { - 'enabled':True + c = Config( + { + "NbConvertBase": { + "display_data_priority": [ + "text/html", + "text/markdown", + "image/svg+xml", + "image/png", + "image/jpeg", + "text/plain", + "text/latex", + ] }, - }) + "ExtractOutputPreprocessor": {"enabled": True}, + "HighlightMagicsPreprocessor": {"enabled": True}, + } + ) c.merge(super().default_config) return c diff -Nru nbconvert-6.4.4/nbconvert/exporters/base.py nbconvert-6.5.3/nbconvert/exporters/base.py --- nbconvert-6.4.4/nbconvert/exporters/base.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/base.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,38 +4,36 @@ # Distributed under the terms of the Modified BSD License. import os -import warnings import entrypoints - +from nbformat import NotebookNode from traitlets.config import get_config from traitlets.log import get_logger from traitlets.utils.importstring import import_item -from nbformat import NotebookNode - from .exporter import Exporter - -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- __all__ = [ - 'export', - 'Exporter', - 'get_exporter', - 'get_export_names', - 'ExporterNameError', + "export", + "Exporter", + "get_exporter", + "get_export_names", + "ExporterNameError", ] class ExporterNameError(NameError): pass + class ExporterDisabledError(ValueError): pass + def export(exporter, nb, **kw): """ Export a notebook object using specific exporter class. @@ -47,7 +45,7 @@ method initializes its own instance of the class, it is ASSUMED that the class type provided exposes a constructor (``__init__``) with the same signature as the base Exporter class. - nb : `nbformat.NotebookNode` + nb : :class:`~nbformat.NotebookNode` The notebook to export. config : config (optional, keyword arg) User configuration instance. @@ -63,23 +61,23 @@ Dictionary of resources used prior to and during the conversion process. """ - - #Check arguments + + # Check arguments if exporter is None: raise TypeError("Exporter is None") elif not isinstance(exporter, Exporter) and not issubclass(exporter, Exporter): raise TypeError("exporter does not inherit from Exporter (base)") if nb is None: raise TypeError("nb is None") - - #Create the exporter - resources = kw.pop('resources', None) + + # Create the exporter + resources = kw.pop("resources", None) if isinstance(exporter, Exporter): exporter_instance = exporter else: exporter_instance = exporter(**kw) - - #Try to convert the notebook using the appropriate conversion function. + + # Try to convert the notebook using the appropriate conversion function. if isinstance(nb, NotebookNode): output, resources = exporter_instance.from_notebook_node(nb, resources) elif isinstance(nb, (str,)): @@ -89,35 +87,35 @@ return output, resources -def get_exporter(name, config=get_config()): +def get_exporter(name, config=get_config()): # noqa """Given an exporter name or import path, return a class ready to be instantiated Raises ExporterName if exporter is not found or ExporterDisabledError if not enabled """ - - if name == 'ipynb': - name = 'notebook' + + if name == "ipynb": + name = "notebook" try: - exporter = entrypoints.get_single('nbconvert.exporters', name).load() - if getattr(exporter(config=config), 'enabled', True): + exporter = entrypoints.get_single("nbconvert.exporters", name).load() + if getattr(exporter(config=config), "enabled", True): return exporter else: raise ExporterDisabledError('Exporter "%s" disabled in configuration' % (name)) except entrypoints.NoSuchEntryPoint: try: - exporter = entrypoints.get_single('nbconvert.exporters', name.lower()).load() - if getattr(exporter(config=config), 'enabled', True): + exporter = entrypoints.get_single("nbconvert.exporters", name.lower()).load() + if getattr(exporter(config=config), "enabled", True): return exporter else: raise ExporterDisabledError('Exporter "%s" disabled in configuration' % (name)) except entrypoints.NoSuchEntryPoint: pass - - if '.' in name: + + if "." in name: try: exporter = import_item(name) - if getattr(exporter(config=config), 'enabled', True): + if getattr(exporter(config=config), "enabled", True): return exporter else: raise ExporterDisabledError('Exporter "%s" disabled in configuration' % (name)) @@ -125,19 +123,24 @@ log = get_logger() log.error("Error importing %s" % name, exc_info=True) - raise ExporterNameError('Unknown exporter "%s", did you mean one of: %s?' - % (name, ', '.join(get_export_names()))) + raise ExporterNameError( + 'Unknown exporter "{}", did you mean one of: {}?'.format( + name, ", ".join(get_export_names()) + ) + ) -def get_export_names(config=get_config()): +def get_export_names(config=get_config()): # noqa """Return a list of the currently supported export targets Exporters can be found in external packages by registering them as an nbconvert.exporter entrypoint. """ - exporters = sorted(entrypoints.get_group_named('nbconvert.exporters')) + exporters = sorted(entrypoints.get_group_named("nbconvert.exporters")) if os.environ.get("NBCONVERT_DISABLE_CONFIG_EXPORTERS"): - get_logger().info("Config exporter loading disabled, no additional exporters will be automatically included.") + get_logger().info( + "Config exporter loading disabled, no additional exporters will be automatically included." + ) return exporters enabled_exporters = [] diff -Nru nbconvert-6.4.4/nbconvert/exporters/exporter.py nbconvert-6.5.3/nbconvert/exporters/exporter.py --- nbconvert-6.4.4/nbconvert/exporters/exporter.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/exporter.py 2022-08-11 11:50:51.000000000 +0000 @@ -5,41 +5,38 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function, absolute_import -import io -import os -import copy import collections +import copy import datetime +import os import sys +from typing import Optional import nbformat - -from traitlets.config.configurable import LoggingConfigurable +from traitlets import Bool, HasTraits, List, TraitError, Unicode from traitlets.config import Config -from traitlets import Bool, HasTraits, Unicode, List, TraitError +from traitlets.config.configurable import LoggingConfigurable from traitlets.utils.importstring import import_item -from typing import Optional class ResourcesDict(collections.defaultdict): def __missing__(self, key): - return '' + return "" class FilenameExtension(Unicode): """A trait for filename extensions.""" - default_value = u'' - info_text = 'a filename extension, beginning with a dot' + default_value = "" + info_text = "a filename extension, beginning with a dot" def validate(self, obj, value): # cast to proper unicode value = super().validate(obj, value) # check that it starts with a dot - if value and not value.startswith('.'): + if value and not value.startswith("."): msg = "FileExtension trait '{}' does not begin with a dot: {!r}" raise TraitError(msg.format(self.name, value)) @@ -53,48 +50,50 @@ accompanying resources dict. """ - enabled = Bool(True, - help = "Disable this exporter (and any exporters inherited from it)." - ).tag(config=True) + enabled = Bool(True, help="Disable this exporter (and any exporters inherited from it).").tag( + config=True + ) file_extension = FilenameExtension( help="Extension of the file that should be written to disk" ).tag(config=True) - optimistic_validation = Bool(False, - help = "Reduces the number of validation steps so that it only occurs after all preprocesors have run." + optimistic_validation = Bool( + False, + help="Reduces the number of validation steps so that it only occurs after all preprocesors have run.", ).tag(config=True) # MIME type of the result file, for HTTP response headers. # This is *not* a traitlet, because we want to be able to access it from # the class, not just on instances. - output_mimetype = '' + output_mimetype = "" # Should this converter be accessible from the notebook front-end? # If so, should be a friendly name to display (and possibly translated). export_from_notebook = None - #Configurability, allows the user to easily add filters and preprocessors. - preprocessors = List( - help="""List of preprocessors, by name or namespace, to enable.""" - ).tag(config=True) + # Configurability, allows the user to easily add filters and preprocessors. + preprocessors = List(help="""List of preprocessors, by name or namespace, to enable.""").tag( + config=True + ) _preprocessors = List() - default_preprocessors = List([ - 'nbconvert.preprocessors.TagRemovePreprocessor', - 'nbconvert.preprocessors.RegexRemovePreprocessor', - 'nbconvert.preprocessors.ClearOutputPreprocessor', - 'nbconvert.preprocessors.ExecutePreprocessor', - 'nbconvert.preprocessors.coalesce_streams', - 'nbconvert.preprocessors.SVG2PDFPreprocessor', - 'nbconvert.preprocessors.LatexPreprocessor', - 'nbconvert.preprocessors.HighlightMagicsPreprocessor', - 'nbconvert.preprocessors.ExtractOutputPreprocessor', - 'nbconvert.preprocessors.ClearMetadataPreprocessor', - ], + default_preprocessors = List( + [ + "nbconvert.preprocessors.TagRemovePreprocessor", + "nbconvert.preprocessors.RegexRemovePreprocessor", + "nbconvert.preprocessors.ClearOutputPreprocessor", + "nbconvert.preprocessors.ExecutePreprocessor", + "nbconvert.preprocessors.coalesce_streams", + "nbconvert.preprocessors.SVG2PDFPreprocessor", + "nbconvert.preprocessors.LatexPreprocessor", + "nbconvert.preprocessors.HighlightMagicsPreprocessor", + "nbconvert.preprocessors.ExtractOutputPreprocessor", + "nbconvert.preprocessors.ClearMetadataPreprocessor", + ], help="""List of preprocessors available by default, by name, namespace, - instance, or type.""" + instance, or type.""", ).tag(config=True) def __init__(self, config=None, **kw): @@ -128,7 +127,7 @@ Parameters ---------- - nb : `nbformat.NotebookNode` + nb : :class:`~nbformat.NotebookNode` Notebook node (dict-like with attr-access) resources : dict Additional resources that can be accessed read/write by @@ -140,15 +139,15 @@ nb_copy = copy.deepcopy(nb) resources = self._init_resources(resources) - if 'language' in nb['metadata']: - resources['language'] = nb['metadata']['language'].lower() + if "language" in nb["metadata"]: + resources["language"] = nb["metadata"]["language"].lower() # Preprocess nb_copy, resources = self._preprocess(nb_copy, resources) - notebook_name = '' + notebook_name = "" if resources is not None: - name = resources.get('metadata', {}).get('name', '') - path = resources.get('metadata', {}).get('path', '') + name = resources.get("metadata", {}).get("name", "") + path = resources.get("metadata", {}).get("path", "") notebook_name = os.path.join(path, name) self._nb_metadata[notebook_name] = nb_copy.metadata return nb_copy, resources @@ -171,25 +170,24 @@ # Pull the metadata from the filesystem. if resources is None: resources = ResourcesDict() - if not 'metadata' in resources or resources['metadata'] == '': - resources['metadata'] = ResourcesDict() + if "metadata" not in resources or resources["metadata"] == "": + resources["metadata"] = ResourcesDict() path, basename = os.path.split(filename) notebook_name = os.path.splitext(basename)[0] - resources['metadata']['name'] = notebook_name - resources['metadata']['path'] = path + resources["metadata"]["name"] = notebook_name + resources["metadata"]["path"] = path modified_date = datetime.datetime.fromtimestamp(os.path.getmtime(filename)) # datetime.strftime date format for ipython - if sys.platform == 'win32': + if sys.platform == "win32": date_format = "%B %d, %Y" else: date_format = "%B %-d, %Y" - resources['metadata']['modified_date'] = modified_date.strftime(date_format) + resources["metadata"]["modified_date"] = modified_date.strftime(date_format) - with io.open(filename, encoding='utf-8') as f: + with open(filename, encoding="utf-8") as f: return self.from_file(f, resources=resources, **kw) - def from_file(self, file_stream, resources=None, **kw): """ Convert a notebook from a notebook file. @@ -205,8 +203,9 @@ Ignored """ - return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) - + return self.from_notebook_node( + nbformat.read(file_stream, as_version=4), resources=resources, **kw + ) def register_preprocessor(self, preprocessor, enabled=False): """ @@ -225,18 +224,21 @@ """ if preprocessor is None: - raise TypeError('preprocessor must not be None') + raise TypeError("preprocessor must not be None") isclass = isinstance(preprocessor, type) constructed = not isclass # Handle preprocessor's registration based on it's type - if constructed and isinstance(preprocessor, str,): + if constructed and isinstance( + preprocessor, + str, + ): # Preprocessor is a string, import the namespace and recursively call # this register_preprocessor method preprocessor_cls = import_item(preprocessor) return self.register_preprocessor(preprocessor_cls, enabled) - if constructed and hasattr(preprocessor, '__call__'): + if constructed and hasattr(preprocessor, "__call__"): # noqa # Preprocessor is a function, no need to construct it. # Register and return the preprocessor. if enabled: @@ -256,8 +258,9 @@ else: # Preprocessor is an instance of something without a __call__ # attribute. - raise TypeError('preprocessor must be callable or an importable constructor, got %r' % preprocessor) - + raise TypeError( + "preprocessor must be callable or an importable constructor, got %r" % preprocessor + ) def _init_preprocessors(self): """ @@ -274,10 +277,9 @@ for preprocessor in self.preprocessors: self.register_preprocessor(preprocessor, enabled=True) - def _init_resources(self, resources): - #Make sure the resources dict is of ResourcesDict type. + # Make sure the resources dict is of ResourcesDict type. if resources is None: resources = ResourcesDict() if not isinstance(resources, ResourcesDict): @@ -285,28 +287,27 @@ new_resources.update(resources) resources = new_resources - #Make sure the metadata extension exists in resources - if 'metadata' in resources: - if not isinstance(resources['metadata'], ResourcesDict): + # Make sure the metadata extension exists in resources + if "metadata" in resources: + if not isinstance(resources["metadata"], ResourcesDict): new_metadata = ResourcesDict() - new_metadata.update(resources['metadata']) - resources['metadata'] = new_metadata + new_metadata.update(resources["metadata"]) + resources["metadata"] = new_metadata else: - resources['metadata'] = ResourcesDict() - if not resources['metadata']['name']: - resources['metadata']['name'] = 'Notebook' + resources["metadata"] = ResourcesDict() + if not resources["metadata"]["name"]: + resources["metadata"]["name"] = "Notebook" - #Set the output extension - resources['output_extension'] = self.file_extension + # Set the output extension + resources["output_extension"] = self.file_extension return resources def _validate_preprocessor(self, nbc, preprocessor): try: nbformat.validate(nbc, relax_add_props=True) except nbformat.ValidationError: - self.log.error('Notebook is invalid after preprocessor %s', - preprocessor) - raise + self.log.error("Notebook is invalid after preprocessor %s", preprocessor) + raise def _preprocess(self, nb, resources): """ @@ -325,7 +326,7 @@ # Do a copy.deepcopy first, # we are never safe enough with what the preprocessors could do. - nbc = copy.deepcopy(nb) + nbc = copy.deepcopy(nb) resc = copy.deepcopy(resources) # Run each preprocessor on the notebook. Carry the output along @@ -336,6 +337,6 @@ self._validate_preprocessor(nbc, preprocessor) if self.optimistic_validation: - self._validate_preprocessor(nbc, preprocessor) + self._validate_preprocessor(nbc, preprocessor) return nbc, resc diff -Nru nbconvert-6.4.4/nbconvert/exporters/html.py nbconvert-6.5.3/nbconvert/exporters/html.py --- nbconvert-6.4.4/nbconvert/exporters/html.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/html.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,19 +1,19 @@ -# -*- coding: utf-8 -*- """HTML Exporter class""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -import os -import mimetypes -import json import base64 +import json +import mimetypes +import os from pathlib import Path -from traitlets import default, Unicode, Bool -from traitlets.config import Config -from jupyter_core.paths import jupyter_path import jinja2 +import markupsafe +from jupyter_core.paths import jupyter_path +from traitlets import Bool, Unicode, default +from traitlets.config import Config if tuple(int(x) for x in jinja2.__version__.split(".")[:3]) < (3, 0, 0): from jinja2 import contextfilter @@ -23,8 +23,8 @@ from jinja2.loaders import split_template_path from nbconvert.filters.highlight import Highlight2HTML -from nbconvert.filters.widgetsdatatypefilter import WidgetsDataTypeFilter from nbconvert.filters.markdown_mistune import IPythonRenderer, MarkdownWithMath +from nbconvert.filters.widgetsdatatypefilter import WidgetsDataTypeFilter from .templateexporter import TemplateExporter @@ -50,24 +50,24 @@ labextension_path : Path The path to the found labextension on the system. """ - paths = jupyter_path('labextensions') + paths = jupyter_path("labextensions") matching_themes = [] theme_path = None for path in paths: for (dirpath, dirnames, filenames) in os.walk(path): # If it's a federated labextension that contains themes - if 'package.json' in filenames and 'themes' in dirnames: + if "package.json" in filenames and "themes" in dirnames: # TODO Find the theme name in the JS code instead? # TODO Find if it's a light or dark theme? - with open(Path(dirpath) / 'package.json', 'r', encoding="utf-8") as fobj: - labext_name = json.loads(fobj.read())['name'] + with open(Path(dirpath) / "package.json", encoding="utf-8") as fobj: + labext_name = json.loads(fobj.read())["name"] - if labext_name == theme_name or theme_name in labext_name.split('/'): + if labext_name == theme_name or theme_name in labext_name.split("/"): matching_themes.append(labext_name) full_theme_name = labext_name - theme_path = Path(dirpath) / 'themes' / labext_name + theme_path = Path(dirpath) / "themes" / labext_name if len(matching_themes) == 0: raise ValueError(f'Could not find lab theme "{theme_name}"') @@ -75,7 +75,7 @@ if len(matching_themes) > 1: raise ValueError( f'Found multiple themes matching "{theme_name}": {matching_themes}. ' - 'Please be more specific about which theme you want to use.' + "Please be more specific about which theme you want to use." ) return full_theme_name, theme_path @@ -88,13 +88,16 @@ custom preprocessors/filters. If you don't need custom preprocessors/ filters, just change the 'template_file' config option. """ - export_from_notebook = "HTML" - anchor_link_text = Unicode(u'¶', - help="The text used as the text for anchor links.").tag(config=True) + export_from_notebook = "HTML" - exclude_anchor_links = Bool(False, - help="If anchor links should be included or not.").tag(config=True) + anchor_link_text = Unicode("¶", help="The text used as the text for anchor links.").tag( + config=True + ) + + exclude_anchor_links = Bool(False, help="If anchor links should be included or not.").tag( + config=True + ) require_js_url = Unicode( "https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js", @@ -102,7 +105,7 @@ URL to load require.js from. Defaults to loading from cdnjs. - """ + """, ).tag(config=True) mathjax_url = Unicode( @@ -111,7 +114,7 @@ URL to load Mathjax from. Defaults to loading from cdnjs. - """ + """, ).tag(config=True) jquery_url = Unicode( @@ -120,68 +123,75 @@ URL to load jQuery from. Defaults to loading from cdnjs. - """ + """, ).tag(config=True) jupyter_widgets_base_url = Unicode( - "https://unpkg.com/", - help="URL base for Jupyter widgets" + "https://unpkg.com/", help="URL base for Jupyter widgets" ).tag(config=True) widget_renderer_url = Unicode("", help="Full URL for Jupyter widgets").tag(config=True) html_manager_semver_range = Unicode( - "*", - help="Semver range for Jupyter widgets HTML manager" + "*", help="Semver range for Jupyter widgets HTML manager" ).tag(config=True) - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.html' + return ".html" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'lab' + return "lab" theme = Unicode( - 'light', - help="Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)" + "light", + help="Template specific theme(e.g. the name of a JupyterLab CSS theme distributed as prebuilt extension for the lab template)", + ).tag(config=True) + + sanitize_html = Bool( + False, + help=( + "Whether the HTML in Markdown cells and cell outputs should be sanitized." + "This should be set to True by nbviewer or similar tools." + ), ).tag(config=True) - embed_images = Bool(False, - help="Whether or not to embed images as base64 in markdown cells.").tag(config=True) + embed_images = Bool( + False, help="Whether or not to embed images as base64 in markdown cells." + ).tag(config=True) - output_mimetype = 'text/html' + output_mimetype = "text/html" @property def default_config(self): - c = Config({ - 'NbConvertBase': { - 'display_data_priority': [ - 'application/vnd.jupyter.widget-view+json', - 'application/javascript', - 'text/html', - 'text/markdown', - 'image/svg+xml', - 'text/latex', - 'image/png', - 'image/jpeg', - 'text/plain' - ] - }, - 'HighlightMagicsPreprocessor': { - 'enabled': True + c = Config( + { + "NbConvertBase": { + "display_data_priority": [ + "application/vnd.jupyter.widget-view+json", + "application/javascript", + "text/html", + "text/markdown", + "image/svg+xml", + "text/latex", + "image/png", + "image/jpeg", + "text/plain", + ] + }, + "HighlightMagicsPreprocessor": {"enabled": True}, } - }) + ) c.merge(super().default_config) return c @contextfilter def markdown2html(self, context, source): """Markdown to HTML filter respecting the anchor_link_text setting""" - cell = context.get('cell', {}) - attachments = cell.get('attachments', {}) - path = context.get('resources', {}).get('metadata', {}).get('path', '') + cell = context.get("cell", {}) + attachments = cell.get("attachments", {}) + path = context.get("resources", {}).get("metadata", {}).get("path", "") renderer = IPythonRenderer( escape=False, @@ -189,60 +199,65 @@ embed_images=self.embed_images, path=path, anchor_link_text=self.anchor_link_text, - exclude_anchor_links=self.exclude_anchor_links + exclude_anchor_links=self.exclude_anchor_links, ) return MarkdownWithMath(renderer=renderer).render(source) def default_filters(self): - for pair in super().default_filters(): - yield pair - yield ('markdown2html', self.markdown2html) + yield from super().default_filters() + yield ("markdown2html", self.markdown2html) def from_notebook_node(self, nb, resources=None, **kw): - langinfo = nb.metadata.get('language_info', {}) - lexer = langinfo.get('pygments_lexer', langinfo.get('name', None)) - highlight_code = self.filters.get('highlight_code', Highlight2HTML(pygments_lexer=lexer, parent=self)) + langinfo = nb.metadata.get("language_info", {}) + lexer = langinfo.get("pygments_lexer", langinfo.get("name", None)) + highlight_code = self.filters.get( + "highlight_code", Highlight2HTML(pygments_lexer=lexer, parent=self) + ) - filter_data_type = WidgetsDataTypeFilter(notebook_metadata=self._nb_metadata, parent=self, resources=resources) + filter_data_type = WidgetsDataTypeFilter( + notebook_metadata=self._nb_metadata, parent=self, resources=resources + ) - self.register_filter('highlight_code', highlight_code) - self.register_filter('filter_data_type', filter_data_type) + self.register_filter("highlight_code", highlight_code) + self.register_filter("filter_data_type", filter_data_type) return super().from_notebook_node(nb, resources, **kw) def _init_resources(self, resources): def resources_include_css(name): env = self.environment code = """""" % (env.loader.get_source(env, name)[0]) - return jinja2.Markup(code) + return markupsafe.Markup(code) def resources_include_lab_theme(name): # Try to find the theme with the given name, looking through the labextensions _, theme_path = find_lab_theme(name) - with open(theme_path / 'index.css', 'r') as file: + with open(theme_path / "index.css") as file: data = file.read() # Embed assets (fonts, images...) for asset in os.listdir(theme_path): - local_url = "url({})".format(Path(asset).as_posix()) + local_url = f"url({Path(asset).as_posix()})" if local_url in data: mime_type = mimetypes.guess_type(asset)[0] # Replace asset url by a base64 dataurl - with open(theme_path / asset, 'rb') as assetfile: + with open(theme_path / asset, "rb") as assetfile: base64_data = base64.b64encode(assetfile.read()) - base64_data = base64_data.replace(b'\n', b'').decode('ascii') + base64_data = base64_data.replace(b"\n", b"").decode("ascii") - data = data.replace(local_url, 'url(data:{};base64,{})'.format(mime_type, base64_data)) + data = data.replace( + local_url, f"url(data:{mime_type};base64,{base64_data})" + ) code = """""" % data - return jinja2.Markup(code) + return markupsafe.Markup(code) def resources_include_js(name): env = self.environment code = """""" % (env.loader.get_source(env, name)[0]) - return jinja2.Markup(code) + return markupsafe.Markup(code) def resources_include_url(name): env = self.environment @@ -250,7 +265,7 @@ try: # we try to load via the jinja loader, but that tries to load # as (encoded) text - data = env.loader.get_source(env, name)[0].encode('utf8') + data = env.loader.get_source(env, name)[0].encode("utf8") except UnicodeDecodeError: # if that fails (for instance a binary file, png or ttf) # we mimic jinja2 @@ -262,22 +277,23 @@ data = f.read() break else: - raise ValueError("No file %r found in %r" % (name, searchpaths)) + raise ValueError(f"No file {name!r} found in {searchpath!r}") data = base64.b64encode(data) - data = data.replace(b'\n', b'').decode('ascii') - src = 'data:{mime_type};base64,{data}'.format(mime_type=mime_type, data=data) - return jinja2.Markup(src) + data = data.replace(b"\n", b"").decode("ascii") + src = f"data:{mime_type};base64,{data}" + return markupsafe.Markup(src) resources = super()._init_resources(resources) - resources['theme'] = self.theme - resources['include_css'] = resources_include_css - resources['include_lab_theme'] = resources_include_lab_theme - resources['include_js'] = resources_include_js - resources['include_url'] = resources_include_url - resources['require_js_url'] = self.require_js_url - resources['mathjax_url'] = self.mathjax_url - resources['jquery_url'] = self.jquery_url - resources['jupyter_widgets_base_url'] = self.jupyter_widgets_base_url - resources['widget_renderer_url'] = self.widget_renderer_url - resources['html_manager_semver_range'] = self.html_manager_semver_range + resources["theme"] = self.theme + resources["include_css"] = resources_include_css + resources["include_lab_theme"] = resources_include_lab_theme + resources["include_js"] = resources_include_js + resources["include_url"] = resources_include_url + resources["require_js_url"] = self.require_js_url + resources["mathjax_url"] = self.mathjax_url + resources["jquery_url"] = self.jquery_url + resources["jupyter_widgets_base_url"] = self.jupyter_widgets_base_url + resources["widget_renderer_url"] = self.widget_renderer_url + resources["html_manager_semver_range"] = self.html_manager_semver_range + resources["should_sanitize_html"] = self.sanitize_html return resources diff -Nru nbconvert-6.4.4/nbconvert/exporters/__init__.py nbconvert-6.5.3/nbconvert/exporters/__init__.py --- nbconvert-6.4.4/nbconvert/exporters/__init__.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/__init__.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,15 +1,14 @@ -from .base import (export, get_exporter, - ExporterNameError, get_export_names) +from .asciidoc import ASCIIDocExporter +from .base import ExporterNameError, export, get_export_names, get_exporter +from .exporter import Exporter, FilenameExtension from .html import HTMLExporter -from .slides import SlidesExporter -from .templateexporter import TemplateExporter from .latex import LatexExporter from .markdown import MarkdownExporter -from .asciidoc import ASCIIDocExporter from .notebook import NotebookExporter from .pdf import PDFExporter -from .webpdf import WebPDFExporter from .python import PythonExporter from .rst import RSTExporter -from .exporter import Exporter, FilenameExtension from .script import ScriptExporter +from .slides import SlidesExporter +from .templateexporter import TemplateExporter +from .webpdf import WebPDFExporter diff -Nru nbconvert-6.4.4/nbconvert/exporters/latex.py nbconvert-6.5.3/nbconvert/exporters/latex.py --- nbconvert-6.4.4/nbconvert/exporters/latex.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/latex.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,72 +3,74 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -import os -from traitlets import Unicode, default +from traitlets import default from traitlets.config import Config -from jupyter_core.paths import jupyter_path -from nbconvert.filters.highlight import Highlight2Latex from nbconvert.filters.filter_links import resolve_references +from nbconvert.filters.highlight import Highlight2Latex + from .templateexporter import TemplateExporter + class LatexExporter(TemplateExporter): """ Exports to a Latex template. Inherit from this class if your template is LaTeX based and you need custom transformers/filters. - If you don't need custom transformers/filters, just change the - 'template_file' config option. Place your template in the special "/latex" + If you don't need custom transformers/filters, just change the + 'template_file' config option. Place your template in the special "/latex" subfolder of the "../templates" folder. """ + export_from_notebook = "LaTeX" - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.tex' + return ".tex" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'latex' + return "latex" - output_mimetype = 'text/latex' + output_mimetype = "text/latex" def default_filters(self): - for x in super().default_filters(): - yield x - yield ('resolve_references', resolve_references) + yield from super().default_filters() + yield ("resolve_references", resolve_references) @property def default_config(self): - c = Config({ - 'NbConvertBase': { - 'display_data_priority' : ['text/latex', 'application/pdf', 'image/png', 'image/jpeg', 'image/svg+xml', 'text/markdown', 'text/plain'] + c = Config( + { + "NbConvertBase": { + "display_data_priority": [ + "text/latex", + "application/pdf", + "image/png", + "image/jpeg", + "image/svg+xml", + "text/markdown", + "text/plain", + ] }, - 'ExtractOutputPreprocessor': { - 'enabled':True - }, - 'SVG2PDFPreprocessor': { - 'enabled':True - }, - 'LatexPreprocessor': { - 'enabled':True - }, - 'SphinxPreprocessor': { - 'enabled':True - }, - 'HighlightMagicsPreprocessor': { - 'enabled':True - } - }) + "ExtractOutputPreprocessor": {"enabled": True}, + "SVG2PDFPreprocessor": {"enabled": True}, + "LatexPreprocessor": {"enabled": True}, + "SphinxPreprocessor": {"enabled": True}, + "HighlightMagicsPreprocessor": {"enabled": True}, + } + ) c.merge(super().default_config) return c def from_notebook_node(self, nb, resources=None, **kw): - langinfo = nb.metadata.get('language_info', {}) - lexer = langinfo.get('pygments_lexer', langinfo.get('name', None)) - highlight_code = self.filters.get('highlight_code', Highlight2Latex(pygments_lexer=lexer, parent=self)) - self.register_filter('highlight_code', highlight_code) - + langinfo = nb.metadata.get("language_info", {}) + lexer = langinfo.get("pygments_lexer", langinfo.get("name", None)) + highlight_code = self.filters.get( + "highlight_code", Highlight2Latex(pygments_lexer=lexer, parent=self) + ) + self.register_filter("highlight_code", highlight_code) + return super().from_notebook_node(nb, resources, **kw) def _create_environment(self): diff -Nru nbconvert-6.4.4/nbconvert/exporters/markdown.py nbconvert-6.5.3/nbconvert/exporters/markdown.py --- nbconvert-6.4.4/nbconvert/exporters/markdown.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/markdown.py 2022-08-11 11:50:51.000000000 +0000 @@ -13,39 +13,41 @@ """ Exports to a markdown document (.md) """ + export_from_notebook = "Markdown" - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.md' + return ".md" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'markdown' + return "markdown" - output_mimetype = 'text/markdown' + output_mimetype = "text/markdown" - @default('raw_mimetypes') + @default("raw_mimetypes") def _raw_mimetypes_default(self): - return ['text/markdown', 'text/html', ''] + return ["text/markdown", "text/html", ""] @property def default_config(self): - c = Config({ - 'ExtractOutputPreprocessor': {'enabled': True}, - 'NbConvertBase': { - 'display_data_priority': ['text/html', - 'text/markdown', - 'image/svg+xml', - 'text/latex', - 'image/png', - 'image/jpeg', - 'text/plain' - ] - }, - 'HighlightMagicsPreprocessor': { - 'enabled':True + c = Config( + { + "ExtractOutputPreprocessor": {"enabled": True}, + "NbConvertBase": { + "display_data_priority": [ + "text/html", + "text/markdown", + "image/svg+xml", + "text/latex", + "image/png", + "image/jpeg", + "text/plain", + ] }, - }) + "HighlightMagicsPreprocessor": {"enabled": True}, + } + ) c.merge(super().default_config) return c diff -Nru nbconvert-6.4.4/nbconvert/exporters/notebook.py nbconvert-6.5.3/nbconvert/exporters/notebook.py --- nbconvert-6.4.4/nbconvert/exporters/notebook.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/notebook.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,10 +3,12 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from .exporter import Exporter import nbformat from traitlets import Enum, default +from .exporter import Exporter + + class NotebookExporter(Exporter): """Exports to an IPython notebook. @@ -14,26 +16,27 @@ a notebook (e.g. to execute it) and then write it back to a notebook file. """ - nbformat_version = Enum(list(nbformat.versions), + nbformat_version = Enum( + list(nbformat.versions), default_value=nbformat.current_nbformat, help="""The nbformat version to write. Use this to downgrade notebooks. - """ + """, ).tag(config=True) - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.ipynb' + return ".ipynb" - output_mimetype = 'application/json' + output_mimetype = "application/json" export_from_notebook = "Notebook" def from_notebook_node(self, nb, resources=None, **kw): nb_copy, resources = super().from_notebook_node(nb, resources, **kw) if self.nbformat_version != nb_copy.nbformat: - resources['output_suffix'] = '.v%i' % self.nbformat_version + resources["output_suffix"] = ".v%i" % self.nbformat_version else: - resources['output_suffix'] = '.nbconvert' + resources["output_suffix"] = ".nbconvert" output = nbformat.writes(nb_copy, version=self.nbformat_version) if not output.endswith("\n"): output = output + "\n" diff -Nru nbconvert-6.4.4/nbconvert/exporters/pdf.py nbconvert-6.5.3/nbconvert/exporters/pdf.py --- nbconvert-6.4.4/nbconvert/exporters/pdf.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/pdf.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,31 +3,35 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -import subprocess import os +import shutil +import subprocess import sys +from tempfile import TemporaryDirectory -import shutil -from traitlets import Integer, List, Bool, Instance, Unicode, default -from testpath.tempdir import TemporaryWorkingDirectory -from typing import Optional +from traitlets import Bool, Instance, Integer, List, Unicode, default + +from ..utils import _contextlib_chdir from .latex import LatexExporter + class LatexFailed(IOError): """Exception for failed latex run - + Captured latex output is in error.output. """ + def __init__(self, output): self.output = output - + def __unicode__(self): - return u"PDF creating failed, captured latex output:\n%s" % self.output - + return "PDF creating failed, captured latex output:\n%s" % self.output + def __str__(self): u = self.__unicode__() return u + def prepend_to_env_search_path(varname, value, envdict): """Add value to the environment variable varname in envdict @@ -36,7 +40,8 @@ if not value: return # Nothing to add - envdict[varname] = value + os.pathsep + envdict.get(varname, '') + envdict[varname] = value + os.pathsep + envdict.get(varname, "") + class PDFExporter(LatexExporter): """Writer designed to write to PDF files. @@ -45,39 +50,35 @@ a temporary directory using the template machinery, and then runs LaTeX to create a pdf. """ - export_from_notebook="PDF via LaTeX" - latex_count = Integer(3, - help="How many times latex will be called." - ).tag(config=True) + export_from_notebook = "PDF via LaTeX" - latex_command = List([u"xelatex", u"{filename}", "-quiet"], - help="Shell command used to compile latex." - ).tag(config=True) + latex_count = Integer(3, help="How many times latex will be called.").tag(config=True) - bib_command = List([u"bibtex", u"{filename}"], - help="Shell command used to run bibtex." + latex_command = List( + ["xelatex", "{filename}", "-quiet"], help="Shell command used to compile latex." ).tag(config=True) - verbose = Bool(False, - help="Whether to display the output of latex commands." - ).tag(config=True) + bib_command = List(["bibtex", "{filename}"], help="Shell command used to run bibtex.").tag( + config=True + ) + + verbose = Bool(False, help="Whether to display the output of latex commands.").tag(config=True) texinputs = Unicode(help="texinputs dir. A notebook's directory is added") - writer = Instance("nbconvert.writers.FilesWriter", args=(), kw={'build_directory': '.'}) + writer = Instance("nbconvert.writers.FilesWriter", args=(), kw={"build_directory": "."}) output_mimetype = "application/pdf" - + _captured_output = List() - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.pdf' - + return ".pdf" - @default('template_extension') + @default("template_extension") def _template_extension_default(self): - return '.tex.j2' + return ".tex.j2" def run_command(self, command_list, filename, count, log_function, raise_on_failure=None): """Run command_list count times. @@ -107,96 +108,105 @@ cmd = shutil.which(command_list[0]) if cmd is None: link = "https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex" - raise OSError("{formatter} not found on PATH, if you have not installed " - "{formatter} you may need to do so. Find further instructions " - "at {link}.".format(formatter=command_list[0], link=link)) + raise OSError( + "{formatter} not found on PATH, if you have not installed " + "{formatter} you may need to do so. Find further instructions " + "at {link}.".format(formatter=command_list[0], link=link) + ) - times = 'time' if count == 1 else 'times' + times = "time" if count == 1 else "times" self.log.info("Running %s %i %s: %s", command_list[0], count, times, command) - - shell = (sys.platform == 'win32') + + shell = sys.platform == "win32" if shell: command = subprocess.list2cmdline(command) env = os.environ.copy() - prepend_to_env_search_path('TEXINPUTS', self.texinputs, env) - prepend_to_env_search_path('BIBINPUTS', self.texinputs, env) - prepend_to_env_search_path('BSTINPUTS', self.texinputs, env) + prepend_to_env_search_path("TEXINPUTS", self.texinputs, env) + prepend_to_env_search_path("BIBINPUTS", self.texinputs, env) + prepend_to_env_search_path("BSTINPUTS", self.texinputs, env) - with open(os.devnull, 'rb') as null: + with open(os.devnull, "rb") as null: stdout = subprocess.PIPE if not self.verbose else None - for index in range(count): - p = subprocess.Popen(command, stdout=stdout, stderr=subprocess.STDOUT, - stdin=null, shell=shell, env=env) + for _ in range(count): + p = subprocess.Popen( + command, + stdout=stdout, + stderr=subprocess.STDOUT, + stdin=null, + shell=shell, + env=env, + ) out, _ = p.communicate() if p.returncode: if self.verbose: # verbose means I didn't capture stdout with PIPE, # so it's already been displayed and `out` is None. - out = u'' + out = "" else: - out = out.decode('utf-8', 'replace') + out = out.decode("utf-8", "replace") log_function(command, out) self._captured_output.append(out) if raise_on_failure: raise raise_on_failure( 'Failed to run "{command}" command:\n{output}'.format( - command=command, output=out)) - return False # failure - return True # success + command=command, output=out + ) + ) + return False # failure + return True # success def run_latex(self, filename, raise_on_failure=LatexFailed): """Run xelatex self.latex_count times.""" def log_error(command, out): - self.log.critical(u"%s failed: %s\n%s", command[0], command, out) + self.log.critical("%s failed: %s\n%s", command[0], command, out) - return self.run_command(self.latex_command, filename, - self.latex_count, log_error, raise_on_failure) + return self.run_command( + self.latex_command, filename, self.latex_count, log_error, raise_on_failure + ) def run_bib(self, filename, raise_on_failure=False): """Run bibtex one time.""" filename = os.path.splitext(filename)[0] def log_error(command, out): - self.log.warning('%s had problems, most likely because there were no citations', - command[0]) - self.log.debug(u"%s output: %s\n%s", command[0], command, out) + self.log.warning( + "%s had problems, most likely because there were no citations", command[0] + ) + self.log.debug("%s output: %s\n%s", command[0], command, out) return self.run_command(self.bib_command, filename, 1, log_error, raise_on_failure) - + def from_notebook_node(self, nb, resources=None, **kw): - latex, resources = super().from_notebook_node( - nb, resources=resources, **kw - ) + latex, resources = super().from_notebook_node(nb, resources=resources, **kw) # set texinputs directory, so that local files will be found - if resources and resources.get('metadata', {}).get('path'): - self.texinputs = resources['metadata']['path'] + if resources and resources.get("metadata", {}).get("path"): + self.texinputs = resources["metadata"]["path"] else: self.texinputs = os.getcwd() self._captured_outputs = [] - with TemporaryWorkingDirectory(): - notebook_name = 'notebook' - resources['output_extension'] = '.tex' + with TemporaryDirectory() as td, _contextlib_chdir.chdir(td): + notebook_name = "notebook" + resources["output_extension"] = ".tex" tex_file = self.writer.write(latex, resources, notebook_name=notebook_name) self.log.info("Building PDF") self.run_latex(tex_file) if self.run_bib(tex_file): self.run_latex(tex_file) - pdf_file = notebook_name + '.pdf' + pdf_file = notebook_name + ".pdf" if not os.path.isfile(pdf_file): - raise LatexFailed('\n'.join(self._captured_output)) - self.log.info('PDF successfully created') - with open(pdf_file, 'rb') as f: + raise LatexFailed("\n".join(self._captured_output)) + self.log.info("PDF successfully created") + with open(pdf_file, "rb") as f: pdf_data = f.read() - + # convert output extension to pdf # the writer above required it to be tex - resources['output_extension'] = '.pdf' + resources["output_extension"] = ".pdf" # clear figure outputs, extracted by latex export, # so we don't claim to be a multi-file export. - resources.pop('outputs', None) - + resources.pop("outputs", None) + return pdf_data, resources - diff -Nru nbconvert-6.4.4/nbconvert/exporters/python.py nbconvert-6.5.3/nbconvert/exporters/python.py --- nbconvert-6.4.4/nbconvert/exporters/python.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/python.py 2022-08-11 11:50:51.000000000 +0000 @@ -14,12 +14,13 @@ Note that the file produced will have a shebang of '#!/usr/bin/env python' regardless of the actual python version used in the notebook. """ - @default('file_extension') + + @default("file_extension") def _file_extension_default(self): - return '.py' + return ".py" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'python' + return "python" - output_mimetype = 'text/x-python' + output_mimetype = "text/x-python" diff -Nru nbconvert-6.4.4/nbconvert/exporters/rst.py nbconvert-6.5.3/nbconvert/exporters/rst.py --- nbconvert-6.4.4/nbconvert/exporters/rst.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/rst.py 2022-08-11 11:50:51.000000000 +0000 @@ -13,27 +13,25 @@ """ Exports reStructuredText documents. """ - - @default('file_extension') + + @default("file_extension") def _file_extension_default(self): - return '.rst' + return ".rst" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'rst' + return "rst" - output_mimetype = 'text/restructuredtext' + output_mimetype = "text/restructuredtext" export_from_notebook = "reST" @property def default_config(self): - c = Config({ - 'ExtractOutputPreprocessor':{ - 'enabled':True - }, - 'HighlightMagicsPreprocessor': { - 'enabled':True - }, - }) + c = Config( + { + "ExtractOutputPreprocessor": {"enabled": True}, + "HighlightMagicsPreprocessor": {"enabled": True}, + } + ) c.merge(super().default_config) return c diff -Nru nbconvert-6.4.4/nbconvert/exporters/script.py nbconvert-6.5.3/nbconvert/exporters/script.py --- nbconvert-6.4.4/nbconvert/exporters/script.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/script.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,10 +4,10 @@ # Distributed under the terms of the Modified BSD License. import entrypoints -from .templateexporter import TemplateExporter - from traitlets import Dict, default + from .base import get_exporter +from .templateexporter import TemplateExporter class ScriptExporter(TemplateExporter): @@ -16,13 +16,13 @@ _lang_exporters = Dict() export_from_notebook = "Script" - @default('template_file') + @default("template_file") def _template_file_default(self): - return 'script.j2' + return "script.j2" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'script' + return "script" def _get_language_exporter(self, lang_name): """Find an exporter for the language name from notebook metadata. @@ -32,8 +32,7 @@ """ if lang_name not in self._lang_exporters: try: - Exporter = entrypoints.get_single( - 'nbconvert.exporters.script', lang_name).load() + Exporter = entrypoints.get_single("nbconvert.exporters.script", lang_name).load() except entrypoints.NoSuchEntryPoint: self._lang_exporters[lang_name] = None else: @@ -42,11 +41,11 @@ return self._lang_exporters[lang_name] def from_notebook_node(self, nb, resources=None, **kw): - langinfo = nb.metadata.get('language_info', {}) + langinfo = nb.metadata.get("language_info", {}) # delegate to custom exporter, if specified - exporter_name = langinfo.get('nbconvert_exporter') - if exporter_name and exporter_name != 'script': + exporter_name = langinfo.get("nbconvert_exporter") + if exporter_name and exporter_name != "script": self.log.debug("Loading script exporter: %s", exporter_name) if exporter_name not in self._exporters: Exporter = get_exporter(exporter_name) @@ -56,7 +55,7 @@ return exporter.from_notebook_node(nb, resources, **kw) # Look up a script exporter for this notebook's language - lang_name = langinfo.get('name') + lang_name = langinfo.get("name") if lang_name: self.log.debug("Using script exporter for language: %s", lang_name) exporter = self._get_language_exporter(lang_name) @@ -64,6 +63,6 @@ return exporter.from_notebook_node(nb, resources, **kw) # Fall back to plain script export - self.file_extension = langinfo.get('file_extension', '.txt') - self.output_mimetype = langinfo.get('mimetype', 'text/plain') + self.file_extension = langinfo.get("file_extension", ".txt") + self.output_mimetype = langinfo.get("mimetype", "text/plain") return super().from_notebook_node(nb, resources, **kw) diff -Nru nbconvert-6.4.4/nbconvert/exporters/slides.py nbconvert-6.5.3/nbconvert/exporters/slides.py --- nbconvert-6.4.4/nbconvert/exporters/slides.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/slides.py 2022-08-11 11:50:51.000000000 +0000 @@ -8,8 +8,8 @@ from traitlets import Bool, Unicode, default -from .html import HTMLExporter from ..preprocessors.base import Preprocessor +from .html import HTMLExporter class _RevealMetadataPreprocessor(Preprocessor): @@ -21,16 +21,15 @@ for cell in nb.cells: # Make sure every cell has a slide_type try: - slide_type = cell.metadata.get( - 'slideshow', {}).get('slide_type', '-') + slide_type = cell.metadata.get("slideshow", {}).get("slide_type", "-") except AttributeError: - slide_type = '-' + slide_type = "-" cell.metadata.slide_type = slide_type # Find the first visible cell for index, cell in enumerate(nb.cells): - if cell.metadata.slide_type not in {'notes', 'skip'}: - cell.metadata.slide_type = 'slide' + if cell.metadata.slide_type not in {"notes", "skip"}: + cell.metadata.slide_type = "slide" cell.metadata.slide_start = True cell.metadata.subslide_start = True first_slide_ix = index @@ -40,8 +39,7 @@ in_fragment = False - for index, cell in enumerate(nb.cells[first_slide_ix+1:], - start=(first_slide_ix+1)): + for index, cell in enumerate(nb.cells[first_slide_ix + 1 :], start=(first_slide_ix + 1)): previous_cell = nb.cells[index - 1] @@ -58,21 +56,21 @@ # Get the slide type. If type is subslide or slide, # end the last slide/subslide/fragment as applicable. - if cell.metadata.slide_type == 'slide': + if cell.metadata.slide_type == "slide": previous_cell.metadata.slide_end = True cell.metadata.slide_start = True - if cell.metadata.slide_type in {'subslide', 'slide'}: + if cell.metadata.slide_type in {"subslide", "slide"}: previous_cell.metadata.fragment_end = in_fragment previous_cell.metadata.subslide_end = True cell.metadata.subslide_start = True in_fragment = False - elif cell.metadata.slide_type == 'fragment': + elif cell.metadata.slide_type == "fragment": cell.metadata.fragment_start = True if in_fragment: previous_cell.metadata.fragment_end = True else: - in_fragment = True + in_fragment = True # The last cell will always be the end of a slide nb.cells[-1].metadata.fragment_end = in_fragment @@ -89,46 +87,49 @@ ################################# export_from_notebook = "Reveal.js slides" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'reveal' + return "reveal" - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.slides.html' + return ".slides.html" - @default('template_extension') + @default("template_extension") def _template_extension_default(self): - return '.html.j2' + return ".html.j2" # Extra resources ################################# reveal_url_prefix = Unicode( help="""The URL prefix for reveal.js (version 3.x). - This defaults to the reveal CDN, but can be any url pointing to a copy - of reveal.js. - - For speaker notes to work, this must be a relative path to a local + This defaults to the reveal CDN, but can be any url pointing to a copy + of reveal.js. + + For speaker notes to work, this must be a relative path to a local copy of reveal.js: e.g., "reveal.js". - + If a relative path is given, it must be a subdirectory of the current directory (from which the server is run). - + See the usage documentation (https://nbconvert.readthedocs.io/en/latest/usage.html#reveal-js-html-slideshow) for more details. """ ).tag(config=True) - @default('reveal_url_prefix') + @default("reveal_url_prefix") def _reveal_url_prefix_default(self): - if 'RevealHelpPreprocessor.url_prefix' in self.config: - warn("Please update RevealHelpPreprocessor.url_prefix to " - "SlidesExporter.reveal_url_prefix in config files.") + if "RevealHelpPreprocessor.url_prefix" in self.config: + warn( + "Please update RevealHelpPreprocessor.url_prefix to " + "SlidesExporter.reveal_url_prefix in config files." + ) return self.config.RevealHelpPreprocessor.url_prefix - return 'https://unpkg.com/reveal.js@4.0.2' + return "https://unpkg.com/reveal.js@4.0.2" - reveal_theme = Unicode('simple', + reveal_theme = Unicode( + "simple", help=""" Name of the reveal.js theme to use. @@ -137,29 +138,32 @@ https://github.com/hakimel/reveal.js/tree/master/css/theme has list of themes that ship by default with reveal.js. - """ + """, ).tag(config=True) - reveal_transition = Unicode('slide', + reveal_transition = Unicode( + "slide", help=""" Name of the reveal.js transition to use. The list of transitions that ships by default with reveal.js are: none, fade, slide, convex, concave and zoom. - """ + """, ).tag(config=True) - reveal_scroll = Bool(False, + reveal_scroll = Bool( + False, help=""" If True, enable scrolling within each slide - """ + """, ).tag(config=True) - reveal_number = Unicode('', + reveal_number = Unicode( + "", help=""" slide number format (e.g. 'c/t'). Choose from: 'c': current, 't': total, 'h': horizontal, 'v': vertical - """ + """, ).tag(config=True) font_awesome_url = Unicode( @@ -168,16 +172,16 @@ URL to load font awesome from. Defaults to loading from cdnjs. - """ + """, ).tag(config=True) def _init_resources(self, resources): resources = super()._init_resources(resources) - if 'reveal' not in resources: - resources['reveal'] = {} - resources['reveal']['url_prefix'] = self.reveal_url_prefix - resources['reveal']['theme'] = self.reveal_theme - resources['reveal']['transition'] = self.reveal_transition - resources['reveal']['scroll'] = self.reveal_scroll - resources['reveal']['number'] = self.reveal_number + if "reveal" not in resources: + resources["reveal"] = {} + resources["reveal"]["url_prefix"] = self.reveal_url_prefix + resources["reveal"]["theme"] = self.reveal_theme + resources["reveal"]["transition"] = self.reveal_transition + resources["reveal"]["scroll"] = self.reveal_scroll + resources["reveal"]["number"] = self.reveal_number return resources diff -Nru nbconvert-6.4.4/nbconvert/exporters/templateexporter.py nbconvert-6.5.3/nbconvert/exporters/templateexporter.py --- nbconvert-6.4.4/nbconvert/exporters/templateexporter.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/templateexporter.py 2022-08-11 11:50:51.000000000 +0000 @@ -5,69 +5,78 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function, absolute_import +import html +import json import os import uuid -import json import warnings from pathlib import Path +from jinja2 import ( + BaseLoader, + ChoiceLoader, + DictLoader, + Environment, + FileSystemLoader, + TemplateNotFound, +) from jupyter_core.paths import jupyter_path -from traitlets import HasTraits, Unicode, List, Dict, Bool, default, observe, validate +from lxml.html.clean import clean_html +from traitlets import Bool, Dict, HasTraits, List, Unicode, default, observe, validate from traitlets.config import Config from traitlets.utils.importstring import import_item -from jupyter_core.paths import jupyter_path -from jinja2 import ( - TemplateNotFound, Environment, ChoiceLoader, FileSystemLoader, BaseLoader, - DictLoader -) from nbconvert import filters + from .exporter import Exporter # Jinja2 extensions to load. -JINJA_EXTENSIONS = ['jinja2.ext.loopcontrols'] +JINJA_EXTENSIONS = ["jinja2.ext.loopcontrols"] ROOT = os.path.dirname(__file__) -DEV_MODE = os.path.exists(os.path.join(ROOT, '../../setup.py')) and os.path.exists(os.path.join(ROOT, '../../share')) +DEV_MODE = os.path.exists(os.path.join(ROOT, "../../setup.py")) and os.path.exists( + os.path.join(ROOT, "../../share") +) default_filters = { - 'indent': filters.indent, - 'markdown2html': filters.markdown2html, - 'markdown2asciidoc': filters.markdown2asciidoc, - 'ansi2html': filters.ansi2html, - 'filter_data_type': filters.DataTypeFilter, - 'get_lines': filters.get_lines, - 'highlight2html': filters.Highlight2HTML, - 'highlight2latex': filters.Highlight2Latex, - 'ipython2python': filters.ipython2python, - 'posix_path': filters.posix_path, - 'markdown2latex': filters.markdown2latex, - 'markdown2rst': filters.markdown2rst, - 'comment_lines': filters.comment_lines, - 'strip_ansi': filters.strip_ansi, - 'strip_dollars': filters.strip_dollars, - 'strip_files_prefix': filters.strip_files_prefix, - 'html2text': filters.html2text, - 'add_anchor': filters.add_anchor, - 'ansi2latex': filters.ansi2latex, - 'wrap_text': filters.wrap_text, - 'escape_latex': filters.escape_latex, - 'citation2latex': filters.citation2latex, - 'path2url': filters.path2url, - 'add_prompts': filters.add_prompts, - 'ascii_only': filters.ascii_only, - 'prevent_list_blocks': filters.prevent_list_blocks, - 'get_metadata': filters.get_metadata, - 'convert_pandoc': filters.convert_pandoc, - 'json_dumps': json.dumps, - # browsers will parse , closing a script tag early - # Since JSON allows escaping forward slash, this will still be parsed by JSON - 'escape_html_script': lambda x: x.replace('', '<\\/script>'), - 'strip_trailing_newline': filters.strip_trailing_newline, - 'text_base64': filters.text_base64, + "indent": filters.indent, + "markdown2html": filters.markdown2html, + "markdown2asciidoc": filters.markdown2asciidoc, + "ansi2html": filters.ansi2html, + "filter_data_type": filters.DataTypeFilter, + "get_lines": filters.get_lines, + "highlight2html": filters.Highlight2HTML, + "highlight2latex": filters.Highlight2Latex, + "ipython2python": filters.ipython2python, + "posix_path": filters.posix_path, + "markdown2latex": filters.markdown2latex, + "markdown2rst": filters.markdown2rst, + "comment_lines": filters.comment_lines, + "strip_ansi": filters.strip_ansi, + "strip_dollars": filters.strip_dollars, + "strip_files_prefix": filters.strip_files_prefix, + "html2text": filters.html2text, + "add_anchor": filters.add_anchor, + "ansi2latex": filters.ansi2latex, + "wrap_text": filters.wrap_text, + "escape_latex": filters.escape_latex, + "citation2latex": filters.citation2latex, + "path2url": filters.path2url, + "add_prompts": filters.add_prompts, + "ascii_only": filters.ascii_only, + "prevent_list_blocks": filters.prevent_list_blocks, + "get_metadata": filters.get_metadata, + "convert_pandoc": filters.convert_pandoc, + "json_dumps": json.dumps, + # For removing any HTML + "escape_html": lambda s: html.escape(str(s)), + "escape_html_keep_quotes": lambda s: html.escape(str(s), quote=False), + # For sanitizing HTML for any XSS + "clean_html": clean_html, + "strip_trailing_newline": filters.strip_trailing_newline, + "text_base64": filters.text_base64, } @@ -96,7 +105,7 @@ # define function at the top level to avoid pickle errors def deprecated(msg): warnings.warn(msg, DeprecationWarning) - + class ExtensionTolerantLoader(BaseLoader): """A template loader which optionally adds a given extension when searching. @@ -106,6 +115,7 @@ name if finding the template without it fails. This should include the dot, e.g. '.tpl'. """ + def __init__(self, loader, extension): self.loader = loader self.extension = extension @@ -116,7 +126,7 @@ except TemplateNotFound: if template.endswith(self.extension): raise TemplateNotFound(template) - return self.loader.get_source(environment, template+self.extension) + return self.loader.get_source(environment, template + self.extension) def list_templates(self): return self.loader.list_templates() @@ -137,8 +147,7 @@ """ # finish the docstring - __doc__ = __doc__.format(filters='- ' + '\n - '.join( - sorted(default_filters.keys()))) + __doc__ = __doc__.format(filters="- " + "\n - ".join(sorted(default_filters.keys()))) _template_cached = None @@ -165,38 +174,40 @@ @property def default_config(self): - c = Config({ - 'RegexRemovePreprocessor': { - 'enabled': True - }, - 'TagRemovePreprocessor': { - 'enabled': True - } - }) + c = Config( + { + "RegexRemovePreprocessor": {"enabled": True}, + "TagRemovePreprocessor": {"enabled": True}, + } + ) c.merge(super().default_config) return c - template_name = Unicode(help="Name of the template to use" - ).tag(config=True, affects_template=True) - - template_file = Unicode(None, allow_none=True, - help="Name of the template file to use" - ).tag(config=True, affects_template=True) - - raw_template = Unicode('', help="raw template string").tag(affects_environment=True) - - enable_async = Bool(False, help="Enable Jinja async template execution").tag(affects_environment=True) + template_name = Unicode(help="Name of the template to use").tag( + config=True, affects_template=True + ) + + template_file = Unicode(None, allow_none=True, help="Name of the template file to use").tag( + config=True, affects_template=True + ) + + raw_template = Unicode("", help="raw template string").tag(affects_environment=True) + + enable_async = Bool(False, help="Enable Jinja async template execution").tag( + affects_environment=True + ) _last_template_file = "" _raw_template_key = "" - @validate('template_name') + @validate("template_name") def _template_name_validate(self, change): - template_name = change['value'] - if template_name and template_name.endswith('.tpl'): + template_name = change["value"] + if template_name and template_name.endswith(".tpl"): warnings.warn( f"5.x style template name passed '{self.template_name}'. Use --template-name for the template directory with a index..j2 file and/or --template-file to denote a different template.", - DeprecationWarning) + DeprecationWarning, + ) directory, self.template_file = os.path.split(self.template_name) if directory: directory, template_name = os.path.split(directory) @@ -205,10 +216,10 @@ self.extra_template_basedirs = [directory] return template_name - @observe('template_file') + @observe("template_file") def _template_file_changed(self, change): - new = change['new'] - if new == 'default': + new = change["new"] + if new == "default": self.template_file = self.default_template return # check if template_file is a file path @@ -218,87 +229,97 @@ directory, self.template_file = os.path.split(full_path) self.extra_template_paths = [directory] + self.extra_template_paths # While not strictly an invalid template file name, the extension hints that there isn't a template directory involved - if self.template_file.endswith('.tpl'): + if self.template_file.endswith(".tpl"): warnings.warn( f"5.x style template file passed '{new}'. Use --template-name for the template directory with a index..j2 file and/or --template-file to denote a different template.", - DeprecationWarning) + DeprecationWarning, + ) - @default('template_file') + @default("template_file") def _template_file_default(self): if self.template_extension: - return 'index' + self.template_extension + return "index" + self.template_extension - @observe('raw_template') + @observe("raw_template") def _raw_template_changed(self, change): - if not change['new']: + if not change["new"]: self.template_file = self._last_template_file self._invalidate_template_cache() - template_paths = List(['.']).tag(config=True, affects_environment=True) + template_paths = List(["."]).tag(config=True, affects_environment=True) extra_template_basedirs = List().tag(config=True, affects_environment=True) extra_template_paths = List([]).tag(config=True, affects_environment=True) - @default('extra_template_basedirs') + @default("extra_template_basedirs") def _default_extra_template_basedirs(self): return [os.getcwd()] - #Extension that the template files use. + # Extension that the template files use. template_extension = Unicode().tag(config=True, affects_environment=True) template_data_paths = List( - jupyter_path('nbconvert','templates'), - help="Path where templates can be installed too." + jupyter_path("nbconvert", "templates"), + help="Path where templates can be installed too.", ).tag(affects_environment=True) - #Extension that the template files use. + # Extension that the template files use. template_extension = Unicode().tag(config=True, affects_environment=True) - @default('template_extension') + @default("template_extension") def _template_extension_default(self): if self.file_extension: - return self.file_extension + '.j2' + return self.file_extension + ".j2" else: return self.file_extension - exclude_input = Bool(False, - help = "This allows you to exclude code cell inputs from all templates if set to True." - ).tag(config=True) - - exclude_input_prompt = Bool(False, - help = "This allows you to exclude input prompts from all templates if set to True." - ).tag(config=True) - - exclude_output = Bool(False, - help = "This allows you to exclude code cell outputs from all templates if set to True." - ).tag(config=True) - - exclude_output_prompt = Bool(False, - help = "This allows you to exclude output prompts from all templates if set to True." - ).tag(config=True) - - exclude_output_stdin = Bool(True, - help = "This allows you to exclude output of stdin stream from lab template if set to True." - ).tag(config=True) - - exclude_code_cell = Bool(False, - help = "This allows you to exclude code cells from all templates if set to True." - ).tag(config=True) - - exclude_markdown = Bool(False, - help = "This allows you to exclude markdown cells from all templates if set to True." - ).tag(config=True) - - exclude_raw = Bool(False, - help = "This allows you to exclude raw cells from all templates if set to True." - ).tag(config=True) - - exclude_unknown = Bool(False, - help = "This allows you to exclude unknown cells from all templates if set to True." - ).tag(config=True) + exclude_input = Bool( + False, + help="This allows you to exclude code cell inputs from all templates if set to True.", + ).tag(config=True) + + exclude_input_prompt = Bool( + False, + help="This allows you to exclude input prompts from all templates if set to True.", + ).tag(config=True) + + exclude_output = Bool( + False, + help="This allows you to exclude code cell outputs from all templates if set to True.", + ).tag(config=True) + + exclude_output_prompt = Bool( + False, + help="This allows you to exclude output prompts from all templates if set to True.", + ).tag(config=True) + + exclude_output_stdin = Bool( + True, + help="This allows you to exclude output of stdin stream from lab template if set to True.", + ).tag(config=True) + + exclude_code_cell = Bool( + False, + help="This allows you to exclude code cells from all templates if set to True.", + ).tag(config=True) + + exclude_markdown = Bool( + False, + help="This allows you to exclude markdown cells from all templates if set to True.", + ).tag(config=True) + + exclude_raw = Bool( + False, + help="This allows you to exclude raw cells from all templates if set to True.", + ).tag(config=True) + + exclude_unknown = Bool( + False, + help="This allows you to exclude unknown cells from all templates if set to True.", + ).tag(config=True) extra_loaders = List( help="Jinja loaders to find templates. Will be tried in order " - "before the default FileSystem ones.", + "before the default FileSystem ones.", ).tag(affects_environment=True) filters = Dict( @@ -310,9 +331,9 @@ help="""formats of raw cells to be included in this Exporter's output.""" ).tag(config=True) - @default('raw_mimetypes') + @default("raw_mimetypes") def _raw_mimetypes_default(self): - return [self.output_mimetype, ''] + return [self.output_mimetype, ""] # TODO: passing config is wrong, but changing this revealed more complicated issues def __init__(self, config=None, **kw): @@ -331,11 +352,11 @@ """ super().__init__(config=config, **kw) - self.observe(self._invalidate_environment_cache, - list(self.traits(affects_environment=True))) - self.observe(self._invalidate_template_cache, - list(self.traits(affects_template=True))) - + self.observe( + self._invalidate_environment_cache, + list(self.traits(affects_environment=True)), + ) + self.observe(self._invalidate_template_cache, list(self.traits(affects_template=True))) def _load_template(self): """Load the Jinja template object from the template file @@ -367,30 +388,30 @@ Parameters ---------- - nb : `nbformat.NotebookNode` + nb : :class:`~nbformat.NotebookNode` Notebook node resources : dict Additional resources that can be accessed read/write by preprocessors and filters. """ nb_copy, resources = super().from_notebook_node(nb, resources, **kw) - resources.setdefault('raw_mimetypes', self.raw_mimetypes) - resources['global_content_filter'] = { - 'include_code': not self.exclude_code_cell, - 'include_markdown': not self.exclude_markdown, - 'include_raw': not self.exclude_raw, - 'include_unknown': not self.exclude_unknown, - 'include_input': not self.exclude_input, - 'include_output': not self.exclude_output, - 'include_output_stdin': not self.exclude_output_stdin, - 'include_input_prompt': not self.exclude_input_prompt, - 'include_output_prompt': not self.exclude_output_prompt, - 'no_prompt': self.exclude_input_prompt and self.exclude_output_prompt, - } + resources.setdefault("raw_mimetypes", self.raw_mimetypes) + resources["global_content_filter"] = { + "include_code": not self.exclude_code_cell, + "include_markdown": not self.exclude_markdown, + "include_raw": not self.exclude_raw, + "include_unknown": not self.exclude_unknown, + "include_input": not self.exclude_input, + "include_output": not self.exclude_output, + "include_output_stdin": not self.exclude_output_stdin, + "include_input_prompt": not self.exclude_input_prompt, + "include_output_prompt": not self.exclude_output_prompt, + "no_prompt": self.exclude_input_prompt and self.exclude_output_prompt, + } # Top level variables are passed to the template_exporter here. output = self.template.render(nb=nb_copy, resources=resources) - output = output.lstrip('\r\n') + output = output.lstrip("\r\n") return output, resources def _register_filter(self, environ, name, jinja_filter): @@ -406,37 +427,37 @@ filter : filter """ if jinja_filter is None: - raise TypeError('filter') + raise TypeError("filter") isclass = isinstance(jinja_filter, type) constructed = not isclass - #Handle filter's registration based on it's type + # Handle filter's registration based on it's type if constructed and isinstance(jinja_filter, (str,)): - #filter is a string, import the namespace and recursively call - #this register_filter method + # filter is a string, import the namespace and recursively call + # this register_filter method filter_cls = import_item(jinja_filter) return self._register_filter(environ, name, filter_cls) - if constructed and hasattr(jinja_filter, '__call__'): - #filter is a function, no need to construct it. + if constructed and hasattr(jinja_filter, "__call__"): # noqa + # filter is a function, no need to construct it. environ.filters[name] = jinja_filter return jinja_filter elif isclass and issubclass(jinja_filter, HasTraits): - #filter is configurable. Make sure to pass in new default for - #the enabled flag if one was specified. + # filter is configurable. Make sure to pass in new default for + # the enabled flag if one was specified. filter_instance = jinja_filter(parent=self) self._register_filter(environ, name, filter_instance) elif isclass: - #filter is not configurable, construct it + # filter is not configurable, construct it filter_instance = jinja_filter() self._register_filter(environ, name, filter_instance) else: - #filter is an instance of something without a __call__ - #attribute. - raise TypeError('filter') + # filter is an instance of something without a __call__ + # attribute. + raise TypeError("filter") def register_filter(self, name, jinja_filter): """ @@ -469,19 +490,19 @@ Create the Jinja templating environment. """ paths = self.template_paths - self.log.debug('Template paths:\n\t%s', '\n\t'.join(paths)) + self.log.debug("Template paths:\n\t%s", "\n\t".join(paths)) loaders = self.extra_loaders + [ ExtensionTolerantLoader(FileSystemLoader(paths), self.template_extension), - DictLoader({self._raw_template_key: self.raw_template}) + DictLoader({self._raw_template_key: self.raw_template}), ] environment = Environment( loader=ChoiceLoader(loaders), extensions=JINJA_EXTENSIONS, - enable_async=self.enable_async - ) + enable_async=self.enable_async, + ) - environment.globals['uuid4'] = uuid.uuid4 + environment.globals["uuid4"] = uuid.uuid4 # Add default filters to the Jinja2 environment for key, value in self.default_filters(): @@ -497,15 +518,15 @@ def _init_preprocessors(self): super()._init_preprocessors() conf = self._get_conf() - preprocessors = conf.get('preprocessors', {}) + preprocessors = conf.get("preprocessors", {}) # preprocessors is a dict for three reasons # * We rely on recursive_update, which can only merge dicts, lists will be overwritten # * We can use the key with numerical prefixing to guarantee ordering (/etc/*.d/XY-file style) # * We can disable preprocessors by overwriting the value with None - for key, preprocessor in sorted(preprocessors.items(), key=lambda x: x[0]): + for _, preprocessor in sorted(preprocessors.items(), key=lambda x: x[0]): if preprocessor is not None: kwargs = preprocessor.copy() - preprocessor_cls = kwargs.pop('type') + preprocessor_cls = kwargs.pop("type") preprocessor_cls = import_item(preprocessor_cls) if preprocessor_cls.__name__ in self.config: kwargs.update(self.config[preprocessor_cls.__name__]) @@ -515,13 +536,13 @@ def _get_conf(self): conf = {} # the configuration once all conf files are merged for path in map(Path, self.template_paths): - conf_path = path / 'conf.json' + conf_path = path / "conf.json" if conf_path.exists(): with conf_path.open() as f: conf = recursive_update(conf, json.load(f)) return conf - @default('template_paths') + @default("template_paths") def _template_paths(self, prune=True, root_dirs=None): paths = [] root_dirs = self.get_prefix_root_dirs() @@ -532,7 +553,7 @@ if not prune or os.path.exists(path): paths.append(path) for root_dir in root_dirs: - base_dir = os.path.join(root_dir, 'nbconvert', 'templates') + base_dir = os.path.join(root_dir, "nbconvert", "templates") path = os.path.join(base_dir, template_name) if not prune or os.path.exists(path): paths.append(path) @@ -543,10 +564,10 @@ paths.append(root_dir) # we include base_dir for when we want to be explicit, but less than root_dir, e.g. # {% extends 'classic/base.html' %} - base_dir = os.path.join(root_dir, 'nbconvert', 'templates') + base_dir = os.path.join(root_dir, "nbconvert", "templates") paths.append(base_dir) - compatibility_dir = os.path.join(root_dir, 'nbconvert', 'templates', 'compatibility') + compatibility_dir = os.path.join(root_dir, "nbconvert", "templates", "compatibility") paths.append(compatibility_dir) additional_paths = [] @@ -554,16 +575,15 @@ if not prune or os.path.exists(path): additional_paths.append(path) - return paths + self.extra_template_paths + additional_paths @classmethod def get_compatibility_base_template_conf(cls, name): # Hard-coded base template confs to use for backwards compatibility for 5.x-only templates - if name == 'display_priority': - return dict(base_template='base') - if name == 'full': - return dict(base_template='classic', mimetypes={"text/html": True}) + if name == "display_priority": + return dict(base_template="base") + if name == "full": + return dict(base_template="classic", mimetypes={"text/html": True}) def get_template_names(self): # finds a list of template names where each successive template name is the base template @@ -579,43 +599,55 @@ template_dir = os.path.join(base_dir, base_template) if os.path.exists(template_dir): found_at_least_one = True - conf_file = os.path.join(template_dir, 'conf.json') + conf_file = os.path.join(template_dir, "conf.json") if os.path.exists(conf_file): with open(conf_file) as f: conf = recursive_update(json.load(f), conf) for root_dir in root_dirs: - template_dir = os.path.join(root_dir, 'nbconvert', 'templates', base_template) + template_dir = os.path.join(root_dir, "nbconvert", "templates", base_template) if os.path.exists(template_dir): found_at_least_one = True - conf_file = os.path.join(template_dir, 'conf.json') + conf_file = os.path.join(template_dir, "conf.json") if os.path.exists(conf_file): with open(conf_file) as f: conf = recursive_update(json.load(f), conf) if not found_at_least_one: # Check for backwards compatibility template names for root_dir in root_dirs: - compatibility_file = base_template + '.tpl' - compatibility_path = os.path.join(root_dir, 'nbconvert', 'templates', 'compatibility', compatibility_file) + compatibility_file = base_template + ".tpl" + compatibility_path = os.path.join( + root_dir, + "nbconvert", + "templates", + "compatibility", + compatibility_file, + ) if os.path.exists(compatibility_path): found_at_least_one = True warnings.warn( f"5.x template name passed '{self.template_name}'. Use 'lab' or 'classic' for new template usage.", - DeprecationWarning) + DeprecationWarning, + ) self.template_file = compatibility_file conf = self.get_compatibility_base_template_conf(base_template) - self.template_name = conf.get('base_template') + self.template_name = conf.get("base_template") break if not found_at_least_one: paths = "\n\t".join(root_dirs) - raise ValueError('No template sub-directory with name %r found in the following paths:\n\t%s' % (base_template, paths)) + raise ValueError( + "No template sub-directory with name %r found in the following paths:\n\t%s" + % (base_template, paths) + ) merged_conf = recursive_update(dict(conf), merged_conf) - base_template = conf.get('base_template') + base_template = conf.get("base_template") conf = merged_conf - mimetypes = [mimetype for mimetype, enabled in conf.get('mimetypes', {}).items() if enabled] + mimetypes = [mimetype for mimetype, enabled in conf.get("mimetypes", {}).items() if enabled] if self.output_mimetype and self.output_mimetype not in mimetypes and mimetypes: - supported_mimetypes = '\n\t'.join(mimetypes) - raise ValueError('Unsupported mimetype %r for template %r, mimetypes supported are: \n\t%s' %\ - (self.output_mimetype, self.template_name, supported_mimetypes)) + supported_mimetypes = "\n\t".join(mimetypes) + raise ValueError( + "Unsupported mimetype %r for template %r, mimetypes supported are: \n\t%s" + % (self.output_mimetype, self.template_name, supported_mimetypes) + ) return template_names def get_prefix_root_dirs(self): @@ -623,11 +655,11 @@ # relative to the package directory (first entry, meaning with highest precedence) root_dirs = [] if DEV_MODE: - root_dirs.append(os.path.abspath(os.path.join(ROOT, '..', '..', 'share', 'jupyter'))) + root_dirs.append(os.path.abspath(os.path.join(ROOT, "..", "..", "share", "jupyter"))) root_dirs.extend(jupyter_path()) return root_dirs def _init_resources(self, resources): resources = super()._init_resources(resources) - resources['deprecated'] = deprecated + resources["deprecated"] = deprecated return resources diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/base.py nbconvert-6.5.3/nbconvert/exporters/tests/base.py --- nbconvert-6.4.4/nbconvert/exporters/tests/base.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/base.py 2022-08-11 11:50:51.000000000 +0000 @@ -8,31 +8,32 @@ from ...tests.base import TestsBase all_raw_mimetypes = { - 'text/x-python', - 'text/markdown', - 'text/html', - 'text/restructuredtext', - 'text/latex', + "text/x-python", + "text/markdown", + "text/html", + "text/restructuredtext", + "text/latex", } + class ExportersTestsBase(TestsBase): """Contains base test functions for exporters""" - + exporter_class = None should_include_raw = None - - def _get_notebook(self, nb_name='notebook2.ipynb'): + + def _get_notebook(self, nb_name="notebook2.ipynb"): return os.path.join(self._get_files_path(), nb_name) - + def test_raw_cell_inclusion(self): """test raw cell inclusion based on raw_mimetype metadata""" if self.should_include_raw is None: return exporter = self.exporter_class() - (output, resources) = exporter.from_filename(self._get_notebook('rawtest.ipynb')) + (output, resources) = exporter.from_filename(self._get_notebook("rawtest.ipynb")) for inc in self.should_include_raw: - self.assertIn('raw %s' % inc, output, "should include %s" % inc) - self.assertIn('no raw_mimetype metadata', output) + self.assertIn("raw %s" % inc, output, "should include %s" % inc) + self.assertIn("no raw_mimetype metadata", output) for exc in all_raw_mimetypes.difference(self.should_include_raw): - self.assertNotIn('raw %s' % exc, output, "should exclude %s" % exc) - self.assertNotIn('never be included', output) + self.assertNotIn("raw %s" % exc, output, "should exclude %s" % exc) + self.assertNotIn("never be included", output) diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/cheese.py nbconvert-6.5.3/nbconvert/exporters/tests/cheese.py --- nbconvert-6.4.4/nbconvert/exporters/tests/cheese.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/cheese.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,37 +1,36 @@ """ Contains CheesePreprocessor """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- from ...preprocessors.base import Preprocessor -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Classes -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + class CheesePreprocessor(Preprocessor): """ Adds a cheese tag to the resources object """ - def __init__(self, **kw): """ Public constructor """ super().__init__(**kw) - def preprocess(self, nb, resources): """ Sphinx preprocessing to apply on each notebook. @@ -44,5 +43,5 @@ Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine. """ - resources['cheese'] = 'real' + resources["cheese"] = "real" return nb, resources diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/files/notebook_inject.ipynb nbconvert-6.5.3/nbconvert/exporters/tests/files/notebook_inject.ipynb --- nbconvert-6.4.4/nbconvert/exporters/tests/files/notebook_inject.ipynb 1970-01-01 00:00:00.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/files/notebook_inject.ipynb 2022-08-11 11:50:51.000000000 +0000 @@ -0,0 +1,303 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "79aede83-fba6-4715-bce6-9f3926b128a2", + "metadata": { + "tags": ["FOO\">
alert('raw cell')" + ] + }, + { + "cell_type": "markdown", + "id": "2d42de4a", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b72e53fa", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/svg+xml": [""] + }, + "execution_count": null, + "metadata": {} + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "64d5d39f", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "svg_filename": "\">", + "data": { + "image/svg+xml": [""] + }, + "execution_count": null, + "metadata": {} + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b72e63fa", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/png": [""] + }, + "execution_count": null, + "metadata": { + "filenames": { + "image/png": "\">" + } + } + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b72e63f3", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/jpeg": [""] + }, + "execution_count": null, + "metadata": { + "filenames": { + "image/jpeg": "\">" + } + } + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b72e635a", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/png": ["\">"] + }, + "execution_count": null, + "metadata": {} + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "p72e635a", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/jpeg": ["\">"] + }, + "execution_count": null, + "metadata": {} + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d72e635a", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/png": ["abcd"] + }, + "execution_count": null, + "metadata": { + "width": ">" + } + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d72e095a", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/png": ["abcd"] + }, + "execution_count": null, + "metadata": { + "width": [">"] + } + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ae4f574d", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "image/png": ["abcd"] + }, + "execution_count": null, + "metadata": { + "height": ">" + } + } + ], + "source": [""] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "w72e635a", + "metadata": {}, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "application/vnd.jupyter.widget-view+json": {"model_id": "wid1", "foo": "\"" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os; os.system('touch /tmp/pwned')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "3616e107", + "metadata": {}, + "outputs": [ + { + "data": { + "text/markdown": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os; os.system('touch /tmp/pwned')" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "4616e107", + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "alert('application/javascript output')" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os; os.system('touch /tmp/pwned')" + ] + } + ], + "metadata": { + "title": "TITLE", + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.5" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": {"state": {"wid1": {}}, "foo": "pwntester" not in output + + # Check injection in the metadata.widgets of the Notebook + assert "" not in output + + # Check injection in the cell.source of the Notebook + assert "" not in output + + # Check injection in svg output + assert "" not in output + assert "" not in output + + # Check injection in image filenames + assert "" not in output + assert "" not in output + + # Check injection in image data + assert "" not in output + assert "" not in output + + # Check injection in image width/height + assert "" not in output + assert "" not in output + + # Check injection in widget view + assert ( + "" in output + assert "" in output + assert "" in output + assert "alert('application/javascript output')" in output + + # But it's an opt-out + for template in ["lab", "classic", "reveal"]: + (output, resources) = HTMLExporter( + template_name=template, sanitize_html=True + ).from_filename(self._get_notebook("notebook_inject.ipynb")) + + assert "" not in output + assert "" not in output + assert "" not in output + assert "alert('application/javascript output')" not in output diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_latex.py nbconvert-6.5.3/nbconvert/exporters/tests/test_latex.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_latex.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_latex.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,20 +4,17 @@ # Distributed under the terms of the Modified BSD License. import os.path -from tempfile import TemporaryDirectory -import textwrap import re - -from .base import ExportersTestsBase -from ..latex import LatexExporter -from ...tests.utils import onlyif_cmds_exist - -from traitlets.config import Config -from nbformat import write -from nbformat import v4 +import textwrap +from tempfile import TemporaryDirectory from jinja2 import DictLoader +from nbformat import v4, write +from traitlets.config import Config +from ...tests.utils import onlyif_cmds_exist +from ..latex import LatexExporter +from .base import ExportersTestsBase current_dir = os.path.dirname(__file__) @@ -26,7 +23,7 @@ """Contains test functions for latex.py""" exporter_class = LatexExporter - should_include_raw = ['latex'] + should_include_raw = ["latex"] def test_constructor(self): """ @@ -34,8 +31,7 @@ """ LatexExporter() - - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_export(self): """ Can a LatexExporter export something? @@ -43,22 +39,23 @@ (output, resources) = LatexExporter().from_filename(self._get_notebook()) assert len(output) > 0 - - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_export_book(self): """ Can a LatexExporter export using 'report' template? """ - (output, resources) = LatexExporter(template_file='report').from_filename(self._get_notebook()) + (output, resources) = LatexExporter(template_file="report").from_filename( + self._get_notebook() + ) assert len(output) > 0 - - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_very_long_cells(self): """ Torture test that long cells do not cause issues """ - lorem_ipsum_text = textwrap.dedent("""\ + lorem_ipsum_text = textwrap.dedent( + """\ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dignissim, ipsum non facilisis tempus, dui felis tincidunt metus, nec pulvinar neque odio eget risus. Nulla nisi lectus, cursus @@ -71,77 +68,79 @@ erat, non hendrerit urna. Sed eu diam nec massa egestas pharetra at nec tellus. Fusce feugiat lacus quis urna sollicitudin volutpat. Quisque at sapien non nibh feugiat tempus ac ultricies purus. - """) - lorem_ipsum_text = lorem_ipsum_text.replace("\n"," ") + "\n\n" - large_lorem_ipsum_text = "".join([lorem_ipsum_text]*3000) + """ + ) + lorem_ipsum_text = lorem_ipsum_text.replace("\n", " ") + "\n\n" + large_lorem_ipsum_text = "".join([lorem_ipsum_text] * 3000) notebook_name = "lorem_ipsum_long.ipynb" - nb = v4.new_notebook( - cells=[ - v4.new_markdown_cell(source=large_lorem_ipsum_text) - ] - ) + nb = v4.new_notebook(cells=[v4.new_markdown_cell(source=large_lorem_ipsum_text)]) with TemporaryDirectory() as td: nbfile = os.path.join(td, notebook_name) - with open(nbfile, 'w') as f: + with open(nbfile, "w") as f: write(nb, f, 4) (output, resources) = LatexExporter().from_filename(nbfile) assert len(output) > 0 - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_prompt_number_color(self): """ Does LatexExporter properly format input and output prompts in color? """ (output, resources) = LatexExporter().from_filename( - self._get_notebook(nb_name="prompt_numbers.ipynb")) - + self._get_notebook(nb_name="prompt_numbers.ipynb") + ) + in_regex = r"\\prompt\{In\}\{incolor\}\{(\d+|\s*)\}" out_regex = r"\\prompt\{Out\}\{outcolor\}\{(\d+|\s*)\}" - ins = ["2", "10", " ", " ", "0"] + ins = ["2", "10", " ", " ", "0"] outs = ["10"] assert re.findall(in_regex, output) == ins assert re.findall(out_regex, output) == outs - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_prompt_number_color_ipython(self): """ Does LatexExporter properly format input and output prompts in color? Uses an in memory latex template to load style_ipython as the cell style. """ - my_loader_tplx = DictLoader({'my_template': - r""" + my_loader_tplx = DictLoader( + { + "my_template": r""" ((* extends 'style_ipython.tex.j2' *)) ((* block docclass *)) \documentclass[11pt]{article} ((* endblock docclass *)) - """}) + """ + } + ) class MyExporter(LatexExporter): - template_file = 'my_template' + template_file = "my_template" (output, resources) = MyExporter(extra_loaders=[my_loader_tplx]).from_filename( - self._get_notebook(nb_name="prompt_numbers.ipynb")) - + self._get_notebook(nb_name="prompt_numbers.ipynb") + ) + in_regex = r"In \[\{\\color\{incolor\}(.*)\}\]:" out_regex = r"Out\[\{\\color\{outcolor\}(.*)\}\]:" - ins = ["2", "10", " ", " ", "0"] + ins = ["2", "10", " ", " ", "0"] outs = ["10"] assert re.findall(in_regex, output) == ins assert re.findall(out_regex, output) == outs - - @onlyif_cmds_exist('pandoc') + + @onlyif_cmds_exist("pandoc") def test_no_prompt_yes_input(self): no_prompt = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_input_prompt": True, "exclude_output_prompt": True, } @@ -150,16 +149,17 @@ exporter = LatexExporter(config=c_no_prompt) (output, resources) = exporter.from_filename( - self._get_notebook(nb_name="prompt_numbers.ipynb")) + self._get_notebook(nb_name="prompt_numbers.ipynb") + ) assert "shape" in output assert "evs" in output - @onlyif_cmds_exist('pandoc', 'inkscape') + @onlyif_cmds_exist("pandoc", "inkscape") def test_svg(self): """ Can a LatexExporter export when it recieves raw binary strings form svg? """ - filename = os.path.join(current_dir, 'files', 'svg.ipynb') + filename = os.path.join(current_dir, "files", "svg.ipynb") (output, resources) = LatexExporter().from_filename(filename) assert len(output) > 0 @@ -167,10 +167,10 @@ # Loads in an in memory latex template (.tplx) using jinja2.DictLoader # creates a class that uses this template with the template_file argument # converts an empty notebook using this mechanism - my_loader_tplx = DictLoader({'my_template': "{%- extends 'index' -%}"}) + my_loader_tplx = DictLoader({"my_template": "{%- extends 'index' -%}"}) class MyExporter(LatexExporter): - template_file = 'my_template' + template_file = "my_template" exporter = MyExporter(extra_loaders=[my_loader_tplx]) nb = v4.new_notebook() @@ -184,8 +184,6 @@ def custom_highlight_code(source, language="python", metadata=None, strip_verbatim=False): return source + " ADDED_TEXT" - filters = { - "highlight_code": custom_highlight_code - } + filters = {"highlight_code": custom_highlight_code} (output, resources) = LatexExporter(filters=filters).from_notebook_node(nb) self.assertTrue("ADDED_TEXT" in output) diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_markdown.py nbconvert-6.5.3/nbconvert/exporters/tests/test_markdown.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_markdown.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_markdown.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,29 +1,30 @@ """Tests for MarkdownExporter""" -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -from .base import ExportersTestsBase from ..markdown import MarkdownExporter +from .base import ExportersTestsBase -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Class -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + class TestMarkdownExporter(ExportersTestsBase): """Tests for MarkdownExporter""" exporter_class = MarkdownExporter - should_include_raw = ['markdown', 'html'] + should_include_raw = ["markdown", "html"] def test_constructor(self): """ @@ -31,10 +32,9 @@ """ MarkdownExporter() - def test_export(self): """ Can a MarkdownExporter export something? """ (output, resources) = MarkdownExporter().from_filename(self._get_notebook()) - assert len(output) > 0 \ No newline at end of file + assert len(output) > 0 diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_notebook.py nbconvert-6.5.3/nbconvert/exporters/tests/test_notebook.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_notebook.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_notebook.py 2022-08-11 11:50:51.000000000 +0000 @@ -5,12 +5,14 @@ import json -from .base import ExportersTestsBase -from ..notebook import NotebookExporter - from nbformat import validate + from nbconvert.tests.base import assert_big_text_equal +from ..notebook import NotebookExporter +from .base import ExportersTestsBase + + class TestNotebookExporter(ExportersTestsBase): """Contains test functions for notebook.py""" @@ -36,4 +38,4 @@ exporter = self.exporter_class(nbformat_version=2) (output, resources) = exporter.from_filename(self._get_notebook()) nb = json.loads(output) - self.assertEqual(nb['nbformat'], 2) + self.assertEqual(nb["nbformat"], 2) diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_pdf.py nbconvert-6.5.3/nbconvert/exporters/tests/test_pdf.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_pdf.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_pdf.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,19 +3,18 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -import logging import os import shutil from tempfile import TemporaryDirectory -from .base import ExportersTestsBase -from ..pdf import PDFExporter from ...tests.utils import onlyif_cmds_exist +from ..pdf import PDFExporter +from .base import ExportersTestsBase - -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Class -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + class TestPDF(ExportersTestsBase): """Test PDF export""" @@ -26,8 +25,7 @@ """Can a PDFExporter be constructed?""" self.exporter_class() - - @onlyif_cmds_exist('xelatex', 'pandoc') + @onlyif_cmds_exist("xelatex", "pandoc") def test_export(self): """Smoke test PDFExporter""" with TemporaryDirectory() as td: diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_python.py nbconvert-6.5.3/nbconvert/exporters/tests/test_python.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_python.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_python.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,15 +3,15 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from .base import ExportersTestsBase from ..python import PythonExporter +from .base import ExportersTestsBase class TestPythonExporter(ExportersTestsBase): """Tests for PythonExporter""" exporter_class = PythonExporter - should_include_raw = ['python'] + should_include_raw = ["python"] def test_constructor(self): """Can a PythonExporter be constructed?""" diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_rst.py nbconvert-6.5.3/nbconvert/exporters/tests/test_rst.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_rst.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_rst.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,23 +3,21 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -import io -import pytest import re import nbformat from nbformat import v4 -from .base import ExportersTestsBase -from ..rst import RSTExporter from ...tests.utils import onlyif_cmds_exist +from ..rst import RSTExporter +from .base import ExportersTestsBase class TestRSTExporter(ExportersTestsBase): """Tests for RSTExporter""" exporter_class = RSTExporter - should_include_raw = ['rst'] + should_include_raw = ["rst"] def test_constructor(self): """ @@ -27,8 +25,7 @@ """ RSTExporter() - - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_export(self): """ Can a RSTExporter export something? @@ -36,38 +33,35 @@ (output, resources) = RSTExporter().from_filename(self._get_notebook()) assert len(output) > 0 - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_empty_code_cell(self): """No empty code cells in rst""" nbname = self._get_notebook() - with io.open(nbname, encoding='utf8') as f: + with open(nbname, encoding="utf8") as f: nb = nbformat.read(f, 4) exporter = self.exporter_class() (output, resources) = exporter.from_notebook_node(nb) # add an empty code cell - nb.cells.append( - v4.new_code_cell(source="") - ) + nb.cells.append(v4.new_code_cell(source="")) (output2, resources) = exporter.from_notebook_node(nb) # adding an empty code cell shouldn't change output self.assertEqual(output.strip(), output2.strip()) - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_png_metadata(self): """ Does RSTExporter treat pngs with width/height metadata correctly? """ (output, resources) = RSTExporter().from_filename( - self._get_notebook(nb_name="pngmetadata.ipynb")) + self._get_notebook(nb_name="pngmetadata.ipynb") + ) assert len(output) > 0 - check_for_png = re.compile( - r'.. image::.*?\n\s+(.*?)\n\s*\n', - re.DOTALL) + check_for_png = re.compile(r".. image::.*?\n\s+(.*?)\n\s*\n", re.DOTALL) result = check_for_png.search(output) assert result is not None attr_string = result.group(1) - assert ':width:' in attr_string - assert ':height:' in attr_string - assert 'px' in attr_string + assert ":width:" in attr_string + assert ":height:" in attr_string + assert "px" in attr_string diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_script.py nbconvert-6.5.3/nbconvert/exporters/tests/test_script.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_script.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_script.py 2022-08-11 11:50:51.000000000 +0000 @@ -7,10 +7,11 @@ import sys from nbformat import v4 + import nbconvert -from .base import ExportersTestsBase from ..script import ScriptExporter +from .base import ExportersTestsBase class TestScriptExporter(ExportersTestsBase): @@ -33,41 +34,42 @@ pynb = v4.new_notebook() (output, resources) = self.exporter_class().from_notebook_node(pynb) - self.assertNotIn('# coding: utf-8', output) + self.assertNotIn("# coding: utf-8", output) pynb.metadata.language_info = { - 'name': 'python', - 'mimetype': 'text/x-python', - 'nbconvert_exporter': 'python', + "name": "python", + "mimetype": "text/x-python", + "nbconvert_exporter": "python", } (output, resources) = self.exporter_class().from_notebook_node(pynb) - self.assertIn('# coding: utf-8', output) + self.assertIn("# coding: utf-8", output) def test_export_config_transfer(self): """delegate config to custom exporter from language_info""" nb = v4.new_notebook() nb.metadata.language_info = { - 'name': 'python', - 'mimetype': 'text/x-python', - 'nbconvert_exporter': 'python', + "name": "python", + "mimetype": "text/x-python", + "nbconvert_exporter": "python", } exporter = self.exporter_class() exporter.from_notebook_node(nb) - assert exporter._exporters['python'] != exporter - assert exporter._exporters['python'].config == exporter.config + assert exporter._exporters["python"] != exporter + assert exporter._exporters["python"].config == exporter.config + def test_script_exporter_entrypoint(): nb = v4.new_notebook() nb.metadata.language_info = { - 'name': 'dummy', - 'mimetype': 'text/x-dummy', + "name": "dummy", + "mimetype": "text/x-dummy", } - p = os.path.join(os.path.dirname(nbconvert.tests.__file__), 'exporter_entrypoint') + p = os.path.join(os.path.dirname(nbconvert.tests.__file__), "exporter_entrypoint") sys.path.insert(0, p) try: output, _ = ScriptExporter().from_notebook_node(nb) - assert output == 'dummy-script-exported' + assert output == "dummy-script-exported" finally: sys.path.remove(p) diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_slides.py nbconvert-6.5.3/nbconvert/exporters/tests/test_slides.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_slides.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_slides.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,15 +4,16 @@ # Distributed under the terms of the Modified BSD License. from nbformat import v4 as nbformat + +from ..slides import SlidesExporter, _RevealMetadataPreprocessor from .base import ExportersTestsBase -from ..slides import SlidesExporter, _RevealMetadataPreprocessor class TestSlidesExporter(ExportersTestsBase): """Tests for SlidesExporter""" exporter_class = SlidesExporter - should_include_raw = ['html'] + should_include_raw = ["html"] def test_constructor(self): """ @@ -20,7 +21,6 @@ """ SlidesExporter() - def test_export(self): """ Can a SlidesExporter export something? @@ -28,7 +28,6 @@ (output, resources) = SlidesExporter().from_filename(self._get_notebook()) assert len(output) > 0 - def test_export_reveal(self): """ Can a SlidesExporter export using the 'reveal' template? @@ -40,17 +39,19 @@ """Build a reveal slides notebook in memory for use with tests.""" outputs = [nbformat.new_output(output_type="stream", name="stdout", text="a")] - slide_metadata = {'slideshow' : {'slide_type': 'slide'}} - subslide_metadata = {'slideshow' : {'slide_type': 'subslide'}} - fragment_metadata = {'slideshow' : {'slide_type': 'fragment'}} - - cells=[nbformat.new_code_cell(source="", execution_count=1, outputs=outputs), - nbformat.new_markdown_cell(source="", metadata=slide_metadata), - nbformat.new_code_cell(source="", execution_count=2, outputs=outputs), - nbformat.new_markdown_cell(source="", metadata=slide_metadata), - nbformat.new_markdown_cell(source="", metadata=subslide_metadata), - nbformat.new_markdown_cell(source="", metadata=fragment_metadata), - nbformat.new_code_cell(source="", execution_count=1, outputs=outputs)] + slide_metadata = {"slideshow": {"slide_type": "slide"}} + subslide_metadata = {"slideshow": {"slide_type": "subslide"}} + fragment_metadata = {"slideshow": {"slide_type": "fragment"}} + + cells = [ + nbformat.new_code_cell(source="", execution_count=1, outputs=outputs), + nbformat.new_markdown_cell(source="", metadata=slide_metadata), + nbformat.new_code_cell(source="", execution_count=2, outputs=outputs), + nbformat.new_markdown_cell(source="", metadata=slide_metadata), + nbformat.new_markdown_cell(source="", metadata=subslide_metadata), + nbformat.new_markdown_cell(source="", metadata=fragment_metadata), + nbformat.new_code_cell(source="", execution_count=1, outputs=outputs), + ] return nbformat.new_notebook(cells=cells) @@ -62,20 +63,20 @@ # Make sure correct metadata tags are available on every cell. for cell in cells: - assert 'slide_type' in cell.metadata + assert "slide_type" in cell.metadata # Make sure slide end is only applied to the cells preceeding slide # cells. - assert not cells[1].metadata.get('slide_end', False) + assert not cells[1].metadata.get("slide_end", False) # Verify 'slide-end' - assert cells[0].metadata['slide_end'] - assert cells[2].metadata['slide_end'] - assert cells[2].metadata['subslide_end'] - - assert not cells[3].metadata.get('slide_end', False) - assert cells[3].metadata['subslide_end'] - - assert cells[-1].metadata['fragment_end'] - assert cells[-1].metadata['subslide_end'] - assert cells[-1].metadata['slide_end'] + assert cells[0].metadata["slide_end"] + assert cells[2].metadata["slide_end"] + assert cells[2].metadata["subslide_end"] + + assert not cells[3].metadata.get("slide_end", False) + assert cells[3].metadata["subslide_end"] + + assert cells[-1].metadata["fragment_end"] + assert cells[-1].metadata["subslide_end"] + assert cells[-1].metadata["slide_end"] diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_templateexporter.py nbconvert-6.5.3/nbconvert/exporters/tests/test_templateexporter.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_templateexporter.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_templateexporter.py 2022-08-11 11:50:51.000000000 +0000 @@ -5,25 +5,25 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -import os import json +import os +from concurrent.futures import ProcessPoolExecutor +from tempfile import TemporaryDirectory +from unittest.mock import patch +import pytest +from jinja2 import TemplateNotFound +from nbformat import v4 from traitlets import default from traitlets.config import Config -from jinja2 import DictLoader, TemplateNotFound -from nbformat import v4 -from unittest.mock import patch -from concurrent.futures import ProcessPoolExecutor -from .base import ExportersTestsBase -from .cheese import CheesePreprocessor -from ..templateexporter import TemplateExporter -from ..rst import RSTExporter +from ...utils import _contextlib_chdir from ..html import HTMLExporter from ..markdown import MarkdownExporter -from testpath import tempdir - -import pytest +from ..rst import RSTExporter +from ..templateexporter import TemplateExporter +from .base import ExportersTestsBase +from .cheese import CheesePreprocessor raw_template = """{%- extends 'index.rst.j2' -%} {%- block in_prompt -%} @@ -31,29 +31,30 @@ {%- endblock in_prompt -%} """ + class SampleExporter(TemplateExporter): """ Exports a Python code file. """ - @default('file_extension') + + @default("file_extension") def _file_extension_default(self): - return '.py' + return ".py" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'python' + return "python" + class TestExporter(ExportersTestsBase): """Contains test functions for exporter.py""" - def test_constructor(self): """ Can a TemplateExporter be constructed? """ TemplateExporter() - def test_export(self): """ Can a TemplateExporter export something? @@ -62,51 +63,48 @@ (output, resources) = exporter.from_filename(self._get_notebook()) assert len(output) > 0 - def test_extract_outputs(self): """ If the ExtractOutputPreprocessor is enabled, are outputs extracted? """ - config = Config({'ExtractOutputPreprocessor': {'enabled': True}}) + config = Config({"ExtractOutputPreprocessor": {"enabled": True}}) exporter = self._make_exporter(config=config) (output, resources) = exporter.from_filename(self._get_notebook()) assert resources is not None - assert isinstance(resources['outputs'], dict) - assert len(resources['outputs']) > 0 - + assert isinstance(resources["outputs"], dict) + assert len(resources["outputs"]) > 0 def test_preprocessor_class(self): """ Can a preprocessor be added to the preprocessors list by class type? """ - config = Config({'Exporter': {'preprocessors': [CheesePreprocessor]}}) + config = Config({"Exporter": {"preprocessors": [CheesePreprocessor]}}) exporter = self._make_exporter(config=config) (output, resources) = exporter.from_filename(self._get_notebook()) assert resources is not None - assert resources['cheese'] == 'real' - + assert resources["cheese"] == "real" def test_preprocessor_instance(self): """ Can a preprocessor be added to the preprocessors list by instance? """ - config = Config({'Exporter': {'preprocessors': [CheesePreprocessor()]}}) + config = Config({"Exporter": {"preprocessors": [CheesePreprocessor()]}}) exporter = self._make_exporter(config=config) (output, resources) = exporter.from_filename(self._get_notebook()) assert resources is not None - assert resources['cheese'] == 'real' - + assert resources["cheese"] == "real" def test_preprocessor_dottedobjectname(self): """ Can a preprocessor be added to the preprocessors list by dotted object name? """ - config = Config({'Exporter': {'preprocessors': ['nbconvert.exporters.tests.cheese.CheesePreprocessor']}}) + config = Config( + {"Exporter": {"preprocessors": ["nbconvert.exporters.tests.cheese.CheesePreprocessor"]}} + ) exporter = self._make_exporter(config=config) (output, resources) = exporter.from_filename(self._get_notebook()) assert resources is not None - assert resources['cheese'] == 'real' - + assert resources["cheese"] == "real" def test_preprocessor_via_method(self): """ @@ -116,7 +114,7 @@ exporter.register_preprocessor(CheesePreprocessor, enabled=True) (output, resources) = exporter.from_filename(self._get_notebook()) assert resources is not None - assert resources['cheese'] == 'real' + assert resources["cheese"] == "real" def test_pickle(self): """ @@ -128,10 +126,10 @@ assert len(output) > 0 def test_absolute_template_file(self): - with tempdir.TemporaryDirectory() as td: - template = os.path.join(td, 'abstemplate.ext.j2') - test_output = 'absolute!' - with open(template, 'w') as f: + with TemporaryDirectory() as td: + template = os.path.join(td, "abstemplate.ext.j2") + test_output = "absolute!" + with open(template, "w") as f: f.write(test_output) config = Config() config.TemplateExporter.template_file = template @@ -140,25 +138,27 @@ assert os.path.dirname(template) in exporter.template_paths def test_relative_template_file(self): - with tempdir.TemporaryWorkingDirectory() as td: - with patch('os.getcwd', return_value=os.path.abspath(td)): - template = os.path.join('relative', 'relative_template.ext.j2') + with TemporaryDirectory() as td, _contextlib_chdir.chdir(td): + with patch("os.getcwd", return_value=os.path.abspath(td)): + template = os.path.join("relative", "relative_template.ext.j2") template_abs = os.path.abspath(os.path.join(td, template)) os.mkdir(os.path.dirname(template_abs)) - test_output = 'relative!' - with open(template_abs, 'w') as f: + test_output = "relative!" + with open(template_abs, "w") as f: f.write(test_output) config = Config() config.TemplateExporter.template_file = template exporter = self._make_exporter(config=config) assert os.path.abspath(exporter.template.filename) == template_abs - assert os.path.dirname(template_abs) in [os.path.abspath(d) for d in exporter.template_paths] + assert os.path.dirname(template_abs) in [ + os.path.abspath(d) for d in exporter.template_paths + ] def test_absolute_template_file_compatibility(self): - with tempdir.TemporaryDirectory() as td: - template = os.path.join(td, 'abstemplate.tpl') - test_output = 'absolute!' - with open(template, 'w') as f: + with TemporaryDirectory() as td: + template = os.path.join(td, "abstemplate.tpl") + test_output = "absolute!" + with open(template, "w") as f: f.write(test_output) config = Config() config.TemplateExporter.template_file = template @@ -168,26 +168,28 @@ assert os.path.dirname(template) in exporter.template_paths def test_relative_template_file_compatibility(self): - with tempdir.TemporaryWorkingDirectory() as td: - with patch('os.getcwd', return_value=os.path.abspath(td)): - template = os.path.join('relative', 'relative_template.tpl') + with TemporaryDirectory() as td, _contextlib_chdir.chdir(td): + with patch("os.getcwd", return_value=os.path.abspath(td)): + template = os.path.join("relative", "relative_template.tpl") template_abs = os.path.abspath(os.path.join(td, template)) os.mkdir(os.path.dirname(template_abs)) - test_output = 'relative!' - with open(template_abs, 'w') as f: + test_output = "relative!" + with open(template_abs, "w") as f: f.write(test_output) config = Config() config.TemplateExporter.template_file = template with pytest.warns(DeprecationWarning): exporter = self._make_exporter(config=config) assert os.path.abspath(exporter.template.filename) == template_abs - assert os.path.dirname(template_abs) in [os.path.abspath(d) for d in exporter.template_paths] + assert os.path.dirname(template_abs) in [ + os.path.abspath(d) for d in exporter.template_paths + ] def test_absolute_template_name_tpl_compatibility(self): - with tempdir.TemporaryDirectory() as td: - template = os.path.join(td, 'abstemplate.tpl') - test_output = 'absolute!' - with open(template, 'w') as f: + with TemporaryDirectory() as td: + template = os.path.join(td, "abstemplate.tpl") + test_output = "absolute!" + with open(template, "w") as f: f.write(test_output) config = Config() # We're setting the template_name instead of the template_file @@ -196,7 +198,7 @@ exporter = self._make_exporter(config=config) assert exporter.template.filename == template assert os.path.dirname(template) in exporter.template_paths - + # Can't use @pytest.mark.parametrize without removing all self.assert calls in all tests... repeating some here def absolute_template_name_5x_compatibility_test(self, template, mimetype=None): config = Config() @@ -206,26 +208,26 @@ exporter = self._make_exporter(config=config) template_dir, template_file = os.path.split(exporter.template.filename) _, compat_dir = os.path.split(template_dir) - assert compat_dir == 'compatibility' - assert template_file == template + '.tpl' + assert compat_dir == "compatibility" + assert template_file == template + ".tpl" assert template_dir in exporter.template_paths def test_absolute_template_name_5x_compatibility_full(self): - self.absolute_template_name_5x_compatibility_test('full', 'text/html') + self.absolute_template_name_5x_compatibility_test("full", "text/html") def test_absolute_template_name_5x_compatibility_display_priority(self): - self.absolute_template_name_5x_compatibility_test('display_priority') + self.absolute_template_name_5x_compatibility_test("display_priority") # Can't use @pytest.mark.parametrize without removing all self.assert calls in all tests... repeating some here def relative_template_test(self, template): - with tempdir.TemporaryWorkingDirectory() as td: - with patch('os.getcwd', return_value=os.path.abspath(td)): + with TemporaryDirectory() as td, _contextlib_chdir.chdir(td): + with patch("os.getcwd", return_value=os.path.abspath(td)): template_abs = os.path.abspath(os.path.join(td, template)) dirname = os.path.dirname(template_abs) if not os.path.exists(dirname): os.mkdir(dirname) - test_output = 'relative!' - with open(template_abs, 'w') as f: + test_output = "relative!" + with open(template_abs, "w") as f: f.write(test_output) config = Config() # We're setting the template_name instead of the template_file @@ -233,28 +235,30 @@ with pytest.warns(DeprecationWarning): exporter = self._make_exporter(config=config) assert os.path.abspath(exporter.template.filename) == template_abs - assert os.path.dirname(template_abs) in [os.path.abspath(d) for d in exporter.template_paths] + assert os.path.dirname(template_abs) in [ + os.path.abspath(d) for d in exporter.template_paths + ] def test_relative_template_name_tpl_compatibility_local(self): - self.relative_template_test('relative_template.tpl') + self.relative_template_test("relative_template.tpl") def test_relative_template_name_tpl_compatibility_nested(self): - self.relative_template_test(os.path.join('relative', 'relative_template.tpl')) + self.relative_template_test(os.path.join("relative", "relative_template.tpl")) def test_relative_template_name_tpl_compatibility_dot(self): - self.relative_template_test(os.path.join('.', 'relative_template.tpl')) + self.relative_template_test(os.path.join(".", "relative_template.tpl")) def test_relative_template_name_tpl_compatibility_dot_nested(self): - self.relative_template_test(os.path.join('.', 'relative', 'relative_template.tpl')) + self.relative_template_test(os.path.join(".", "relative", "relative_template.tpl")) def test_absolute_template_dir(self): - with tempdir.TemporaryDirectory() as td: - template = 'mytemplate' - template_file = os.path.join(td, template, 'index.py.j2') + with TemporaryDirectory() as td: + template = "mytemplate" + template_file = os.path.join(td, template, "index.py.j2") template_dir = os.path.dirname(template_file) os.mkdir(template_dir) - test_output = 'absolute!' - with open(template_file, 'w') as f: + test_output = "absolute!" + with open(template_file, "w") as f: f.write(test_output) config = Config() config.TemplateExporter.template_name = template @@ -265,23 +269,28 @@ assert os.path.join(td, template) in exporter.template_paths def test_local_template_dir(self): - with tempdir.TemporaryWorkingDirectory() as td: - with patch('os.getcwd', return_value=os.path.abspath(td)): - template = 'mytemplate' - template_file = os.path.join(template, 'index.py.j2') + with TemporaryDirectory() as td, _contextlib_chdir.chdir(td): + with patch("os.getcwd", return_value=os.path.abspath(td)): + template = "mytemplate" + template_file = os.path.join(template, "index.py.j2") template_abs = os.path.abspath(os.path.join(td, template_file)) - template_conf = os.path.abspath(os.path.join(td, template, 'conf.json')) + template_conf = os.path.abspath(os.path.join(td, template, "conf.json")) os.mkdir(os.path.dirname(template_abs)) - test_output = 'local!' - with open(template_abs, 'w') as f: + test_output = "local!" + with open(template_abs, "w") as f: f.write(test_output) - with open(template_conf, 'w') as f: + with open(template_conf, "w") as f: # Mimic having a superset of accepted mimetypes - f.write(json.dumps(Config(mimetypes={ - "text/x-python": True, - "text/html": True, - } - ))) + f.write( + json.dumps( + Config( + mimetypes={ + "text/x-python": True, + "text/html": True, + } + ) + ) + ) config = Config() config.TemplateExporter.template_name = template exporter = self._make_exporter(config=config) @@ -290,14 +299,13 @@ assert os.path.join(td, template) in exporter.template_paths def test_local_template_file_extending_lab(self): - template_file = os.path.join(self._get_files_path(), 'lablike.html.j2') - exporter = HTMLExporter(template_file=template_file, template_name='lab') + template_file = os.path.join(self._get_files_path(), "lablike.html.j2") + exporter = HTMLExporter(template_file=template_file, template_name="lab") nb = v4.new_notebook() nb.cells.append(v4.new_code_cell("some_text")) output, resources = exporter.from_notebook_node(nb) assert "UNIQUE" in output - def test_raw_template_attr(self): """ Verify that you can assign a in memory template string by overwriting @@ -309,7 +317,7 @@ class AttrExporter(TemplateExporter): raw_template = raw_template - exporter_attr = AttrExporter(template_name='rst') + exporter_attr = AttrExporter(template_name="rst") output_attr, _ = exporter_attr.from_notebook_node(nb) assert "blah" in output_attr @@ -324,7 +332,6 @@ nb.cells.append(v4.new_code_cell("some_text")) class AttrExporter(RSTExporter): - def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.raw_template = raw_template @@ -332,7 +339,7 @@ exporter_init = AttrExporter() output_init, _ = exporter_init.from_notebook_node(nb) assert "blah" in output_init - exporter_init.raw_template = '' + exporter_init.raw_template = "" assert exporter_init.template_file == "index.rst.j2" output_init, _ = exporter_init.from_notebook_node(nb) assert "blah" not in output_init @@ -348,18 +355,18 @@ nb.cells.append(v4.new_code_cell("some_text")) class AttrDynamicExporter(TemplateExporter): - @default('default_template_file') + @default("default_template_file") def _template_file_default(self): return "index.rst.j2" - @default('raw_template') + @default("raw_template") def _raw_template_default(self): return raw_template - exporter_attr_dynamic = AttrDynamicExporter(template_name='rst') + exporter_attr_dynamic = AttrDynamicExporter(template_name="rst") output_attr_dynamic, _ = exporter_attr_dynamic.from_notebook_node(nb) assert "blah" in output_attr_dynamic - exporter_attr_dynamic.raw_template = '' + exporter_attr_dynamic.raw_template = "" assert exporter_attr_dynamic.template_file == "index.rst.j2" output_attr_dynamic, _ = exporter_attr_dynamic.from_notebook_node(nb) assert "blah" not in output_attr_dynamic @@ -375,23 +382,22 @@ nb.cells.append(v4.new_code_cell("some_text")) class AttrDynamicExporter(TemplateExporter): - @default('raw_template') + @default("raw_template") def _raw_template_default(self): return raw_template - @default('default_template_file') + @default("default_template_file") def _template_file_default(self): - return 'index.rst.j2' + return "index.rst.j2" - exporter_attr_dynamic = AttrDynamicExporter(template_name='rst') + exporter_attr_dynamic = AttrDynamicExporter(template_name="rst") output_attr_dynamic, _ = exporter_attr_dynamic.from_notebook_node(nb) assert "blah" in output_attr_dynamic - exporter_attr_dynamic.raw_template = '' - assert exporter_attr_dynamic.template_file == 'index.rst.j2' + exporter_attr_dynamic.raw_template = "" + assert exporter_attr_dynamic.template_file == "index.rst.j2" output_attr_dynamic, _ = exporter_attr_dynamic.from_notebook_node(nb) assert "blah" not in output_attr_dynamic - def test_raw_template_constructor(self): """ Test `raw_template` as a keyword argument in the exporter constructor. @@ -399,8 +405,9 @@ nb = v4.new_notebook() nb.cells.append(v4.new_code_cell("some_text")) - output_constructor, _ = TemplateExporter(template_name='rst', - raw_template=raw_template).from_notebook_node(nb) + output_constructor, _ = TemplateExporter( + template_name="rst", raw_template=raw_template + ).from_notebook_node(nb) assert "blah" in output_constructor def test_raw_template_assignment(self): @@ -409,7 +416,7 @@ """ nb = v4.new_notebook() nb.cells.append(v4.new_code_cell("some_text")) - exporter_assign = TemplateExporter(template_name='rst') + exporter_assign = TemplateExporter(template_name="rst") exporter_assign.raw_template = raw_template output_assign, _ = exporter_assign.from_notebook_node(nb) assert "blah" in output_assign @@ -420,7 +427,7 @@ """ nb = v4.new_notebook() nb.cells.append(v4.new_code_cell("some_text")) - exporter_reassign = TemplateExporter(template_name='rst') + exporter_reassign = TemplateExporter(template_name="rst") exporter_reassign.raw_template = raw_template output_reassign, _ = exporter_reassign.from_notebook_node(nb) assert "blah" in output_reassign @@ -439,8 +446,8 @@ exporter_deassign.raw_template = raw_template output_deassign, _ = exporter_deassign.from_notebook_node(nb) assert "blah" in output_deassign - exporter_deassign.raw_template = '' - assert exporter_deassign.template_file == 'index.rst.j2' + exporter_deassign.raw_template = "" + assert exporter_deassign.template_file == "index.rst.j2" output_deassign, _ = exporter_deassign.from_notebook_node(nb) assert "blah" not in output_deassign @@ -458,8 +465,8 @@ exporter_dereassign.raw_template = raw_template.replace("blah", "baz") output_dereassign, _ = exporter_dereassign.from_notebook_node(nb) assert "baz" in output_dereassign - exporter_dereassign.raw_template = '' - assert exporter_dereassign.template_file == 'index.rst.j2' + exporter_dereassign.raw_template = "" + assert exporter_dereassign.template_file == "index.rst.j2" output_dereassign, _ = exporter_dereassign.from_notebook_node(nb) assert "blah" not in output_dereassign @@ -468,16 +475,16 @@ # exist in the environment, try to convert empty notebook. Failure is # expected due to nonexistant template file. - template = 'does_not_exist.tpl' + template = "does_not_exist.tpl" exporter = TemplateExporter(template_file=template) - assert template not in exporter.environment.list_templates(extensions=['tpl']) + assert template not in exporter.environment.list_templates(extensions=["tpl"]) nb = v4.new_notebook() with pytest.raises(TemplateNotFound): out, resources = exporter.from_notebook_node(nb) def test_exclude_code_cell(self): no_io = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_output": True, "exclude_input": True, "exclude_input_prompt": False, @@ -488,15 +495,15 @@ } } c_no_io = Config(no_io) - exporter_no_io = TemplateExporter(config=c_no_io, template_name='markdown') - exporter_no_io.template_file = 'index.md.j2' + exporter_no_io = TemplateExporter(config=c_no_io, template_name="markdown") + exporter_no_io.template_file = "index.md.j2" nb_no_io, resources_no_io = exporter_no_io.from_filename(self._get_notebook()) - assert not resources_no_io['global_content_filter']['include_input'] - assert not resources_no_io['global_content_filter']['include_output'] + assert not resources_no_io["global_content_filter"]["include_input"] + assert not resources_no_io["global_content_filter"]["include_output"] no_code = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_output": False, "exclude_input": False, "exclude_input_prompt": False, @@ -507,17 +514,16 @@ } } c_no_code = Config(no_code) - exporter_no_code = TemplateExporter(config=c_no_code, template_name='markdown') - exporter_no_code.template_file = 'index.md.j2' + exporter_no_code = TemplateExporter(config=c_no_code, template_name="markdown") + exporter_no_code.template_file = "index.md.j2" nb_no_code, resources_no_code = exporter_no_code.from_filename(self._get_notebook()) - assert not resources_no_code['global_content_filter']['include_code'] + assert not resources_no_code["global_content_filter"]["include_code"] assert nb_no_io == nb_no_code - def test_exclude_input_prompt(self): no_input_prompt = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_output": False, "exclude_input": False, "exclude_input_prompt": True, @@ -529,15 +535,17 @@ } c_no_input_prompt = Config(no_input_prompt) exporter_no_input_prompt = MarkdownExporter(config=c_no_input_prompt) - nb_no_input_prompt, resources_no_input_prompt = exporter_no_input_prompt.from_filename(self._get_notebook()) + nb_no_input_prompt, resources_no_input_prompt = exporter_no_input_prompt.from_filename( + self._get_notebook() + ) - assert not resources_no_input_prompt['global_content_filter']['include_input_prompt'] + assert not resources_no_input_prompt["global_content_filter"]["include_input_prompt"] assert "# In[" not in nb_no_input_prompt def test_exclude_markdown(self): - no_md= { - "TemplateExporter":{ + no_md = { + "TemplateExporter": { "exclude_output": False, "exclude_input": False, "exclude_input_prompt": False, @@ -549,16 +557,16 @@ } c_no_md = Config(no_md) - exporter_no_md = TemplateExporter(config=c_no_md, template_name='python') - exporter_no_md.template_file = 'index.py.j2' + exporter_no_md = TemplateExporter(config=c_no_md, template_name="python") + exporter_no_md.template_file = "index.py.j2" nb_no_md, resources_no_md = exporter_no_md.from_filename(self._get_notebook()) - assert not resources_no_md['global_content_filter']['include_markdown'] + assert not resources_no_md["global_content_filter"]["include_markdown"] assert "First import NumPy and Matplotlib" not in nb_no_md def test_exclude_output_prompt(self): no_output_prompt = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_output": False, "exclude_input": False, "exclude_input_prompt": False, @@ -569,15 +577,17 @@ } } c_no_output_prompt = Config(no_output_prompt) - exporter_no_output_prompt = HTMLExporter(config=c_no_output_prompt) - nb_no_output_prompt, resources_no_output_prompt = exporter_no_output_prompt.from_filename(self._get_notebook()) + exporter_no_output_prompt = HTMLExporter(config=c_no_output_prompt) + nb_no_output_prompt, resources_no_output_prompt = exporter_no_output_prompt.from_filename( + self._get_notebook() + ) - assert not resources_no_output_prompt['global_content_filter']['include_output_prompt'] + assert not resources_no_output_prompt["global_content_filter"]["include_output_prompt"] assert "Out[1]" not in nb_no_output_prompt def test_exclude_output_stdin(self): no_output_stdin = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_output": False, "exclude_input": False, "exclude_input_prompt": False, @@ -588,17 +598,18 @@ } } c_no_output_stdin = Config(no_output_stdin) - exporter_no_output_prompt = HTMLExporter(config=c_no_output_stdin) + exporter_no_output_prompt = HTMLExporter(config=c_no_output_stdin) nb_no_output_stdin, resources_no_output_stdin = exporter_no_output_prompt.from_filename( - self._get_notebook('notebook3.ipynb')) + self._get_notebook("notebook3.ipynb") + ) - assert not resources_no_output_stdin['global_content_filter']['include_output_stdin'] + assert not resources_no_output_stdin["global_content_filter"]["include_output_stdin"] assert "test input: input value" not in nb_no_output_stdin def test_include_output_stdin(self): output_stdin = { - "TemplateExporter":{ + "TemplateExporter": { "exclude_output": False, "exclude_input": False, "exclude_input_prompt": False, @@ -609,23 +620,26 @@ } } c_output_stdin = Config(output_stdin) - exporter_output_stdin= HTMLExporter(config=c_output_stdin) + exporter_output_stdin = HTMLExporter(config=c_output_stdin) nb_output_stdin, resources_output_stdin = exporter_output_stdin.from_filename( - self._get_notebook('notebook3.ipynb')) + self._get_notebook("notebook3.ipynb") + ) - assert resources_output_stdin['global_content_filter']['include_output_stdin'] + assert resources_output_stdin["global_content_filter"]["include_output_stdin"] assert "test input: input value" in nb_output_stdin def test_remove_elements_with_tags(self): - conf = Config({ - "TagRemovePreprocessor": { - "remove_cell_tags": ["remove_cell"], - "remove_all_outputs_tags": ["remove_output"], - "remove_input_tags": ["remove_input"] + conf = Config( + { + "TagRemovePreprocessor": { + "remove_cell_tags": ["remove_cell"], + "remove_all_outputs_tags": ["remove_output"], + "remove_input_tags": ["remove_input"], }, - }) + } + ) exporter = MarkdownExporter(config=conf) nb, resources = exporter.from_filename(self._get_notebook()) @@ -636,4 +650,4 @@ def _make_exporter(self, config=None): exporter = SampleExporter(config=config) - return exporter \ No newline at end of file + return exporter diff -Nru nbconvert-6.4.4/nbconvert/exporters/tests/test_webpdf.py nbconvert-6.5.3/nbconvert/exporters/tests/test_webpdf.py --- nbconvert-6.4.4/nbconvert/exporters/tests/test_webpdf.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/tests/test_webpdf.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,13 +3,13 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -import io -import pytest - from unittest.mock import patch -from .base import ExportersTestsBase +import pytest + from ..webpdf import WebPDFExporter +from .base import ExportersTestsBase + class TestWebPDFExporter(ExportersTestsBase): """Contains test functions for webpdf.py""" @@ -21,10 +21,12 @@ """ Can a TemplateExporter export something? """ - (output, resources) = WebPDFExporter(allow_chromium_download=True).from_filename(self._get_notebook()) + (output, resources) = WebPDFExporter(allow_chromium_download=True).from_filename( + self._get_notebook() + ) assert len(output) > 0 - @patch('pyppeteer.util.check_chromium', return_value=False) + @patch("pyppeteer.util.check_chromium", return_value=False) def test_webpdf_without_chromium(self, mock_check_chromium): """ Generate PDFs if chromium not present? @@ -38,8 +40,8 @@ """ with pytest.raises(RuntimeError): exporter = WebPDFExporter() - with io.open(self._get_notebook(), encoding='utf-8') as f: + with open(self._get_notebook(), encoding="utf-8") as f: nb = exporter.from_file(f, resources={}) # Have to do this as the very last action as traitlets do dynamic importing often - with patch('builtins.__import__', side_effect=ModuleNotFoundError("Fake missing")): + with patch("builtins.__import__", side_effect=ModuleNotFoundError("Fake missing")): exporter.from_notebook_node(nb) diff -Nru nbconvert-6.4.4/nbconvert/exporters/webpdf.py nbconvert-6.5.3/nbconvert/exporters/webpdf.py --- nbconvert-6.4.4/nbconvert/exporters/webpdf.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/exporters/webpdf.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,12 +4,11 @@ # Distributed under the terms of the Modified BSD License. import asyncio - -import tempfile, os +import concurrent.futures +import os +import tempfile from traitlets import Bool, default -from jupyter_core.paths import jupyter_path -import concurrent.futures from .html import HTMLExporter @@ -20,10 +19,12 @@ This inherits from :class:`HTMLExporter`. It creates the HTML using the template machinery, and then run pyppeteer to create a pdf. """ + export_from_notebook = "PDF via HTML" - allow_chromium_download = Bool(False, - help='Whether to allow downloading Chromium if no suitable version is found on the system.' + allow_chromium_download = Bool( + False, + help="Whether to allow downloading Chromium if no suitable version is found on the system.", ).tag(config=True) paginate = Bool( @@ -34,18 +35,18 @@ If False, a PDF with one long page will be generated. Set to True to match behavior of LaTeX based PDF generator - """ + """, ).tag(config=True) output_mimetype = "text/html" - @default('file_extension') + @default("file_extension") def _file_extension_default(self): - return '.html' + return ".html" - @default('template_name') + @default("template_name") def _template_name_default(self): - return 'webpdf' + return "webpdf" disable_sandbox = Bool( False, @@ -60,7 +61,7 @@ has more information. This is required for webpdf to work inside most container environments. - """ + """, ).tag(config=True) def _check_launch_reqs(self): @@ -68,36 +69,37 @@ from pyppeteer import launch from pyppeteer.util import check_chromium except ModuleNotFoundError as e: - raise RuntimeError("Pyppeteer is not installed to support Web PDF conversion. " - "Please install `nbconvert[webpdf]` to enable.") from e + raise RuntimeError( + "Pyppeteer is not installed to support Web PDF conversion. " + "Please install `nbconvert[webpdf]` to enable." + ) from e if not self.allow_chromium_download and not check_chromium(): - raise RuntimeError("No suitable chromium executable found on the system. " - "Please use '--allow-chromium-download' to allow downloading one.") + raise RuntimeError( + "No suitable chromium executable found on the system. " + "Please use '--allow-chromium-download' to allow downloading one." + ) return launch def run_pyppeteer(self, html): """Run pyppeteer.""" async def main(temp_file): - args = ['--no-sandbox'] if self.disable_sandbox else [] + args = ["--no-sandbox"] if self.disable_sandbox else [] browser = await self._check_launch_reqs()( - handleSIGINT=False, - handleSIGTERM=False, - handleSIGHUP=False, - args=args + handleSIGINT=False, handleSIGTERM=False, handleSIGHUP=False, args=args ) page = await browser.newPage() - await page.emulateMedia('screen') + await page.emulateMedia("screen") await page.waitFor(100) - await page.goto(f'file://{temp_file.name}', waitUntil='networkidle0') + await page.goto(f"file://{temp_file.name}", waitUntil="networkidle0") await page.waitFor(100) - pdf_params = {'printBackground': True} + pdf_params = {"printBackground": True} if not self.paginate: # Floating point precision errors cause the printed # PDF from spilling over a new page by a pixel fraction. dimensions = await page.evaluate( - """() => { + """() => { const rect = document.body.getBoundingClientRect(); return { width: Math.ceil(rect.width) + 1, @@ -105,13 +107,15 @@ } }""" ) - width = dimensions['width'] - height = dimensions['height'] + width = dimensions["width"] + height = dimensions["height"] # 200 inches is the maximum size for Adobe Acrobat Reader. - pdf_params.update({ - 'width': min(width, 200 * 72), - 'height': min(height, 200 * 72), - }) + pdf_params.update( + { + "width": min(width, 200 * 72), + "height": min(height, 200 * 72), + } + ) pdf_data = await page.pdf(pdf_params) await browser.close() @@ -125,7 +129,7 @@ # file is not deleted after closing (the default behavior). temp_file = tempfile.NamedTemporaryFile(suffix=".html", delete=False) with temp_file: - temp_file.write(html.encode('utf-8')) + temp_file.write(html.encode("utf-8")) try: # TODO: when dropping Python 3.6, use # pdf_data = pool.submit(asyncio.run, main(temp_file)).result() @@ -133,6 +137,7 @@ loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) return loop.run_until_complete(coro) + pdf_data = pool.submit(run_coroutine, main(temp_file)).result() finally: # Ensure the file is deleted even if pypeteer raises an exception @@ -141,17 +146,14 @@ def from_notebook_node(self, nb, resources=None, **kw): self._check_launch_reqs() - html, resources = super().from_notebook_node( - nb, resources=resources, **kw - ) + html, resources = super().from_notebook_node(nb, resources=resources, **kw) - self.log.info('Building PDF') + self.log.info("Building PDF") pdf_data = self.run_pyppeteer(html) - self.log.info('PDF successfully created') + self.log.info("PDF successfully created") # convert output extension to pdf # the writer above required it to be html - resources['output_extension'] = '.pdf' + resources["output_extension"] = ".pdf" return pdf_data, resources - diff -Nru nbconvert-6.4.4/nbconvert/filters/ansi.py nbconvert-6.5.3/nbconvert/filters/ansi.py --- nbconvert-6.4.4/nbconvert/filters/ansi.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/ansi.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,33 +4,30 @@ # Distributed under the terms of the Modified BSD License. import re -import jinja2 -__all__ = [ - 'strip_ansi', - 'ansi2html', - 'ansi2latex' -] +import markupsafe -_ANSI_RE = re.compile('\x1b\\[(.*?)([@-~])') +__all__ = ["strip_ansi", "ansi2html", "ansi2latex"] + +_ANSI_RE = re.compile("\x1b\\[(.*?)([@-~])") _ANSI_COLORS = ( - 'ansi-black', - 'ansi-red', - 'ansi-green', - 'ansi-yellow', - 'ansi-blue', - 'ansi-magenta', - 'ansi-cyan', - 'ansi-white', - 'ansi-black-intense', - 'ansi-red-intense', - 'ansi-green-intense', - 'ansi-yellow-intense', - 'ansi-blue-intense', - 'ansi-magenta-intense', - 'ansi-cyan-intense', - 'ansi-white-intense', + "ansi-black", + "ansi-red", + "ansi-green", + "ansi-yellow", + "ansi-blue", + "ansi-magenta", + "ansi-cyan", + "ansi-white", + "ansi-black-intense", + "ansi-red-intense", + "ansi-green-intense", + "ansi-yellow-intense", + "ansi-blue-intense", + "ansi-magenta-intense", + "ansi-cyan-intense", + "ansi-white-intense", ) @@ -44,7 +41,7 @@ Source to remove the ANSI from """ - return _ANSI_RE.sub('', source) + return _ANSI_RE.sub("", source) def ansi2html(text): @@ -57,7 +54,7 @@ Text containing ANSI colors to convert to HTML """ - text = jinja2.utils.escape(text) + text = markupsafe.escape(text) return _ansi2anything(text, _htmlconverter) @@ -80,7 +77,7 @@ """ if (fg, bg, bold, underline, inverse) == (None, None, False, False, False): - return '', '' + return "", "" classes = [] styles = [] @@ -89,32 +86,32 @@ fg, bg = bg, fg if isinstance(fg, int): - classes.append(_ANSI_COLORS[fg] + '-fg') + classes.append(_ANSI_COLORS[fg] + "-fg") elif fg: - styles.append('color: rgb({},{},{})'.format(*fg)) + styles.append("color: rgb({},{},{})".format(*fg)) elif inverse: - classes.append('ansi-default-inverse-fg') + classes.append("ansi-default-inverse-fg") if isinstance(bg, int): - classes.append(_ANSI_COLORS[bg] + '-bg') + classes.append(_ANSI_COLORS[bg] + "-bg") elif bg: - styles.append('background-color: rgb({},{},{})'.format(*bg)) + styles.append("background-color: rgb({},{},{})".format(*bg)) elif inverse: - classes.append('ansi-default-inverse-bg') + classes.append("ansi-default-inverse-bg") if bold: - classes.append('ansi-bold') + classes.append("ansi-bold") if underline: - classes.append('ansi-underline') + classes.append("ansi-underline") - starttag = '' + starttag += ' style="' + "; ".join(styles) + '"' + starttag += ">" + return starttag, "" def _latexconverter(fg, bg, bold, underline, inverse): @@ -123,47 +120,47 @@ """ if (fg, bg, bold, underline, inverse) == (None, None, False, False, False): - return '', '' + return "", "" - starttag, endtag = '', '' + starttag, endtag = "", "" if inverse: fg, bg = bg, fg if isinstance(fg, int): - starttag += r'\textcolor{' + _ANSI_COLORS[fg] + '}{' - endtag = '}' + endtag + starttag += r"\textcolor{" + _ANSI_COLORS[fg] + "}{" + endtag = "}" + endtag elif fg: # See http://tex.stackexchange.com/a/291102/13684 - starttag += r'\def\tcRGB{\textcolor[RGB]}\expandafter' - starttag += r'\tcRGB\expandafter{\detokenize{%s,%s,%s}}{' % fg - endtag = '}' + endtag + starttag += r"\def\tcRGB{\textcolor[RGB]}\expandafter" + starttag += r"\tcRGB\expandafter{\detokenize{%s,%s,%s}}{" % fg + endtag = "}" + endtag elif inverse: - starttag += r'\textcolor{ansi-default-inverse-fg}{' - endtag = '}' + endtag + starttag += r"\textcolor{ansi-default-inverse-fg}{" + endtag = "}" + endtag if isinstance(bg, int): - starttag += r'\setlength{\fboxsep}{0pt}' - starttag += r'\colorbox{' + _ANSI_COLORS[bg] + '}{' - endtag = r'\strut}' + endtag + starttag += r"\setlength{\fboxsep}{0pt}" + starttag += r"\colorbox{" + _ANSI_COLORS[bg] + "}{" + endtag = r"\strut}" + endtag elif bg: - starttag += r'\setlength{\fboxsep}{0pt}' + starttag += r"\setlength{\fboxsep}{0pt}" # See http://tex.stackexchange.com/a/291102/13684 - starttag += r'\def\cbRGB{\colorbox[RGB]}\expandafter' - starttag += r'\cbRGB\expandafter{\detokenize{%s,%s,%s}}{' % bg - endtag = r'\strut}' + endtag + starttag += r"\def\cbRGB{\colorbox[RGB]}\expandafter" + starttag += r"\cbRGB\expandafter{\detokenize{%s,%s,%s}}{" % bg + endtag = r"\strut}" + endtag elif inverse: - starttag += r'\setlength{\fboxsep}{0pt}' - starttag += r'\colorbox{ansi-default-inverse-bg}{' - endtag = r'\strut}' + endtag + starttag += r"\setlength{\fboxsep}{0pt}" + starttag += r"\colorbox{ansi-default-inverse-bg}{" + endtag = r"\strut}" + endtag if bold: - starttag += r'\textbf{' - endtag = '}' + endtag + starttag += r"\textbf{" + endtag = "}" + endtag if underline: - starttag += r'\underline{' - endtag = '}' + endtag + starttag += r"\underline{" + endtag = "}" + endtag return starttag, endtag @@ -192,23 +189,22 @@ while text: m = _ANSI_RE.search(text) if m: - if m.group(2) == 'm': + if m.group(2) == "m": try: # Empty code is same as code 0 - numbers = [int(n) if n else 0 - for n in m.group(1).split(';')] + numbers = [int(n) if n else 0 for n in m.group(1).split(";")] except ValueError: pass # Invalid color specification else: pass # Not a color code - chunk, text = text[:m.start()], text[m.end():] + chunk, text = text[: m.start()], text[m.end() :] else: - chunk, text = text, '' + chunk, text = text, "" if chunk: starttag, endtag = converter( - fg + 8 if bold and fg in range(8) else fg, - bg, bold, underline, inverse) + fg + 8 if bold and fg in range(8) else fg, bg, bold, underline, inverse + ) out.append(starttag) out.append(chunk) out.append(endtag) @@ -258,7 +254,7 @@ bg = n - 100 + 8 else: pass # Unknown codes are ignored - return ''.join(out) + return "".join(out) def _get_extended_color(numbers): diff -Nru nbconvert-6.4.4/nbconvert/filters/citation.py nbconvert-6.5.3/nbconvert/filters/citation.py --- nbconvert-6.4.4/nbconvert/filters/citation.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/citation.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,65 +1,67 @@ """Citation handling for LaTeX output.""" -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- from html.parser import HTMLParser -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -__all__ = ['citation2latex'] +__all__ = ["citation2latex"] def citation2latex(s): """Parse citations in Markdown cells. - + This looks for HTML tags having a data attribute names ``data-cite`` and replaces it by the call to LaTeX cite command. The transformation looks like this:: - + (Granger, 2013) - + Becomes :: - + \\cite{granger} - + Any HTML tag can be used, which allows the citations to be formatted in HTML in any manner. """ parser = CitationParser() parser.feed(s) parser.close() - outtext = u'' + outtext = "" startpos = 0 for citation in parser.citelist: - outtext += s[startpos:citation[1]] - outtext += '\\cite{%s}'%citation[0] - startpos = citation[2] if len(citation)==3 else -1 - outtext += s[startpos:] if startpos != -1 else '' + outtext += s[startpos : citation[1]] + outtext += "\\cite{%s}" % citation[0] + startpos = citation[2] if len(citation) == 3 else -1 + outtext += s[startpos:] if startpos != -1 else "" return outtext -#----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- # Classes -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- class CitationParser(HTMLParser): """Citation Parser Replaces html tags with data-cite attribute with respective latex \\cite. - + Inherites from HTMLParser, overrides: - handle_starttag - handle_endtag """ + # number of open tags opentags = None # list of found citations @@ -71,37 +73,37 @@ self.citelist = [] self.opentags = 0 HTMLParser.__init__(self) - + def get_offset(self): # Compute startposition in source lin, offset = self.getpos() pos = 0 - for i in range(lin-1): - pos = self.data.find('\n',pos) + 1 + for _ in range(lin - 1): + pos = self.data.find("\n", pos) + 1 return pos + offset - + def handle_starttag(self, tag, attrs): # for each tag check if attributes are present and if no citation is active - if self.opentags == 0 and len(attrs)>0: + if self.opentags == 0 and len(attrs) > 0: for atr, data in attrs: - if atr.lower() == 'data-cite': + if atr.lower() == "data-cite": self.citetag = tag self.opentags = 1 self.citelist.append([data, self.get_offset()]) return - + if tag == self.citetag: - # found an open citation tag but not the starting one + # found an open citation tag but not the starting one self.opentags += 1 - + def handle_endtag(self, tag): if tag == self.citetag: # found citation tag check if starting one if self.opentags == 1: pos = self.get_offset() - self.citelist[-1].append(pos+len(tag)+3) + self.citelist[-1].append(pos + len(tag) + 3) self.opentags -= 1 - + def feed(self, data): self.data = data HTMLParser.feed(self, data) diff -Nru nbconvert-6.4.4/nbconvert/filters/datatypefilter.py nbconvert-6.5.3/nbconvert/filters/datatypefilter.py --- nbconvert-6.4.4/nbconvert/filters/datatypefilter.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/datatypefilter.py 2022-08-11 11:50:51.000000000 +0000 @@ -2,31 +2,33 @@ The filter contained in the file allows the converter templates to select the output format that is most valuable to the active export format. The -value of the different formats is set via +value of the different formats is set via NbConvertBase.display_data_priority """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Classes and functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -from ..utils.base import NbConvertBase from warnings import warn -__all__ = ['DataTypeFilter'] +from ..utils.base import NbConvertBase + +__all__ = ["DataTypeFilter"] + class DataTypeFilter(NbConvertBase): - """ Returns the preferred display format """ - + """Returns the preferred display format""" + def __call__(self, output): - """ Return the first available format in the priority. + """Return the first available format in the priority. Produces a UserWarning if no compatible mimetype is found. @@ -36,9 +38,9 @@ for fmt in self.display_data_priority: if fmt in output: return [fmt] - warn("Your element with mimetype(s) {mimetypes}" - " is not able to be represented.".format( - mimetypes=output.keys()) - ) - + warn( + "Your element with mimetype(s) {mimetypes}" + " is not able to be represented.".format(mimetypes=output.keys()) + ) + return [] diff -Nru nbconvert-6.4.4/nbconvert/filters/filter_links.py nbconvert-6.5.3/nbconvert/filters/filter_links.py --- nbconvert-6.4.4/nbconvert/filters/filter_links.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/filter_links.py 2022-08-11 11:50:51.000000000 +0000 @@ -6,6 +6,7 @@ from pandocfilters import RawInline, applyJSONFilters, stringify + def resolve_references(source): """ This applies the resolve_one_reference to the text passed in via the source argument. @@ -15,25 +16,26 @@ """ return applyJSONFilters([resolve_one_reference], source) + def resolve_one_reference(key, val, fmt, meta): """ This takes a tuple of arguments that are compatible with ``pandocfilters.walk()`` that - allows identifying hyperlinks in the document and transforms them into valid LaTeX + allows identifying hyperlinks in the document and transforms them into valid LaTeX \\hyperref{} calls so that linking to headers between cells is possible. See the documentation in ``pandocfilters.walk()`` for further information on the meaning - and specification of ``key``, ``val``, ``fmt``, and ``meta``. + and specification of ``key``, ``val``, ``fmt``, and ``meta``. """ - - if key == 'Link': + + if key == "Link": text = stringify(val[1]) target = val[2][0] - m = re.match(r'#(.+)$', target) + m = re.match(r"#(.+)$", target) if m: # pandoc automatically makes labels for headings. label = m.group(1).lower() - label = re.sub(r'[^\w-]+', '', label) # Strip HTML entities - return RawInline('tex', r'\hyperref[{label}]{{{text}}}'.format(label=label, text=text)) + label = re.sub(r"[^\w-]+", "", label) # Strip HTML entities + text = re.sub(r"_", r"\_", text) # Escape underscores in display text + return RawInline("tex", rf"\hyperref[{label}]{{{text}}}") # Other elements will be returned unchanged. - diff -Nru nbconvert-6.4.4/nbconvert/filters/highlight.py nbconvert-6.5.3/nbconvert/filters/highlight.py --- nbconvert-6.4.4/nbconvert/filters/highlight.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/highlight.py 2022-08-11 11:50:51.000000000 +0000 @@ -10,18 +10,18 @@ # because errors should be raised at runtime if it's actually needed, # not import time, when it may not be needed. -from nbconvert.utils.base import NbConvertBase +from html import escape from warnings import warn from traitlets import observe from traitlets.config import Dict -MULTILINE_OUTPUTS = ['text', 'html', 'svg', 'latex', 'javascript', 'json'] +from nbconvert.utils.base import NbConvertBase + +MULTILINE_OUTPUTS = ["text", "html", "svg", "latex", "javascript", "json"] + +__all__ = ["Highlight2HTML", "Highlight2Latex"] -__all__ = [ - 'Highlight2HTML', - 'Highlight2Latex' -] class Highlight2HTML(NbConvertBase): extra_formatter_options = Dict( @@ -32,18 +32,20 @@ Passed through to the pygments' HtmlFormatter class. See available list in https://pygments.org/docs/formatters/#HtmlFormatter """, - config=True + config=True, ) def __init__(self, pygments_lexer=None, **kwargs): - self.pygments_lexer = pygments_lexer or 'ipython3' + self.pygments_lexer = pygments_lexer or "ipython3" super().__init__(**kwargs) - @observe('default_language') + @observe("default_language") def _default_language_changed(self, change): - warn('Setting default_language in config is deprecated as of 5.0, ' - 'please use language_info metadata instead.') - self.pygments_lexer = change['new'] + warn( + "Setting default_language in config is deprecated as of 5.0, " + "please use language_info metadata instead." + ) + self.pygments_lexer = change["new"] def __call__(self, source, language=None, metadata=None): """ @@ -61,12 +63,17 @@ from pygments.formatters import HtmlFormatter if not language: - language=self.pygments_lexer + language = self.pygments_lexer - return _pygments_highlight(source if len(source) > 0 else ' ', - # needed to help post processors: - HtmlFormatter(cssclass=" highlight hl-" + language, **self.extra_formatter_options), - language, metadata) + return _pygments_highlight( + source if len(source) > 0 else " ", + # needed to help post processors: + HtmlFormatter( + cssclass=escape(f" highlight hl-{language}"), **self.extra_formatter_options + ), + language, + metadata, + ) class Highlight2Latex(NbConvertBase): @@ -78,18 +85,20 @@ Passed through to the pygments' LatexFormatter class. See available list in https://pygments.org/docs/formatters/#LatexFormatter """, - config=True + config=True, ) def __init__(self, pygments_lexer=None, **kwargs): - self.pygments_lexer = pygments_lexer or 'ipython3' + self.pygments_lexer = pygments_lexer or "ipython3" super().__init__(**kwargs) - @observe('default_language') + @observe("default_language") def _default_language_changed(self, change): - warn('Setting default_language in config is deprecated as of 5.0, ' - 'please use language_info metadata instead.') - self.pygments_lexer = change['new'] + warn( + "Setting default_language in config is deprecated as of 5.0, " + "please use language_info metadata instead." + ) + self.pygments_lexer = change["new"] def __call__(self, source, language=None, metadata=None, strip_verbatim=False): """ @@ -107,19 +116,21 @@ remove the Verbatim environment that pygments provides by default """ from pygments.formatters import LatexFormatter + if not language: - language=self.pygments_lexer + language = self.pygments_lexer - latex = _pygments_highlight(source, LatexFormatter(**self.extra_formatter_options), language, metadata) + latex = _pygments_highlight( + source, LatexFormatter(**self.extra_formatter_options), language, metadata + ) if strip_verbatim: - latex = latex.replace(r'\begin{Verbatim}[commandchars=\\\{\}]' + '\n', '') - return latex.replace('\n\\end{Verbatim}\n', '') + latex = latex.replace(r"\begin{Verbatim}[commandchars=\\\{\}]" + "\n", "") # noqa + return latex.replace("\n\\end{Verbatim}\n", "") else: return latex - -def _pygments_highlight(source, output_formatter, language='ipython', metadata=None): +def _pygments_highlight(source, output_formatter, language="ipython", metadata=None): """ Return a syntax-highlighted version of the input source @@ -139,27 +150,25 @@ # If the cell uses a magic extension language, # use the magic language instead. - if language.startswith('ipython') \ - and metadata \ - and 'magics_language' in metadata: + if language.startswith("ipython") and metadata and "magics_language" in metadata: - language = metadata['magics_language'] + language = metadata["magics_language"] lexer = None - if language == 'ipython2': + if language == "ipython2": try: from IPython.lib.lexers import IPythonLexer except ImportError: warn("IPython lexer unavailable, falling back on Python") - language = 'python' + language = "python" else: lexer = IPythonLexer() - elif language == 'ipython3': + elif language == "ipython3": try: from IPython.lib.lexers import IPython3Lexer except ImportError: warn("IPython3 lexer unavailable, falling back on Python 3") - language = 'python3' + language = "python3" else: lexer = IPython3Lexer() @@ -169,7 +178,7 @@ except ClassNotFound: warn("No lexer found for language %r. Treating as plain text." % language) from pygments.lexers.special import TextLexer - lexer = TextLexer() + lexer = TextLexer() return highlight(source, lexer, output_formatter) diff -Nru nbconvert-6.4.4/nbconvert/filters/__init__.py nbconvert-6.5.3/nbconvert/filters/__init__.py --- nbconvert-6.4.4/nbconvert/filters/__init__.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/__init__.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,11 +1,11 @@ +from nbconvert.utils.text import indent + from .ansi import * from .citation import * from .datatypefilter import * from .highlight import * from .latex import * from .markdown import * -from .strings import * from .metadata import * from .pandoc import * - -from nbconvert.utils.text import indent +from .strings import * diff -Nru nbconvert-6.4.4/nbconvert/filters/latex.py nbconvert-6.5.3/nbconvert/filters/latex.py --- nbconvert-6.4.4/nbconvert/filters/latex.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/latex.py 2022-08-11 11:50:51.000000000 +0000 @@ -2,50 +2,47 @@ Module of useful filters for processing Latex within Jinja latex templates. """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- import re -from nbconvert.utils.pandoc import pandoc -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Globals and constants -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -LATEX_RE_SUBS = ( - (re.compile(r'\.\.\.+'), r'{\\ldots}'), -) +LATEX_RE_SUBS = ((re.compile(r"\.\.\.+"), r"{\\ldots}"),) # Latex substitutions for escaping latex. # see: http://stackoverflow.com/questions/16259923/how-can-i-escape-latex-special-characters-inside-django-templates LATEX_SUBS = { - '&': r'\&', - '%': r'\%', - '$': r'\$', - '#': r'\#', - '_': r'\_', - '{': r'\{', - '}': r'\}', - '~': r'\textasciitilde{}', - '^': r'\^{}', - '\\': r'\textbackslash{}', + "&": r"\&", + "%": r"\%", + "$": r"\$", + "#": r"\#", + "_": r"\_", + "{": r"\{", + "}": r"\}", + "~": r"\textasciitilde{}", + "^": r"\^{}", + "\\": r"\textbackslash{}", } -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -__all__ = ['escape_latex'] +__all__ = ["escape_latex"] def escape_latex(text): @@ -57,7 +54,7 @@ text : str Text containing characters that may conflict with Latex """ - text = ''.join(LATEX_SUBS.get(c, c) for c in text) + text = "".join(LATEX_SUBS.get(c, c) for c in text) for pattern, replacement in LATEX_RE_SUBS: text = pattern.sub(replacement, text) diff -Nru nbconvert-6.4.4/nbconvert/filters/markdown_mistune.py nbconvert-6.5.3/nbconvert/filters/markdown_mistune.py --- nbconvert-6.4.4/nbconvert/filters/markdown_mistune.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/markdown_mistune.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Markdown filters with mistune Used from markdown.py @@ -6,28 +5,26 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import base64 -import os import mimetypes +import os import re from functools import partial try: from html import escape + html_escape = partial(escape, quote=False) except ImportError: # Python 2 from cgi import escape as html_escape import bs4 - import mistune - from pygments import highlight -from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter +from pygments.lexers import get_lexer_by_name from pygments.util import ClassNotFound from nbconvert.filters.strings import add_anchor @@ -42,19 +39,19 @@ identify math content spanning multiple lines. These are used by the MathBlockLexer. """ - multi_math_str = "|".join([r"^\$\$.*?\$\$", - r"^\\\\\[.*?\\\\\]", - r"^\\begin\{([a-z]*\*?)\}(.*?)\\end\{\1\}"]) + + multi_math_str = "|".join( + [r"^\$\$.*?\$\$", r"^\\\\\[.*?\\\\\]", r"^\\begin\{([a-z]*\*?)\}(.*?)\\end\{\1\}"] + ) multiline_math = re.compile(multi_math_str, re.DOTALL) class MathBlockLexer(mistune.BlockLexer): - """ This acts as a pass-through to the MathInlineLexer. It is needed in + """This acts as a pass-through to the MathInlineLexer. It is needed in order to avoid other block level rules splitting math sections apart. """ - default_rules = (['multiline_math'] - + mistune.BlockLexer.default_rules) + default_rules = ["multiline_math"] + mistune.BlockLexer.default_rules def __init__(self, rules=None, **kwargs): if rules is None: @@ -63,21 +60,18 @@ def parse_multiline_math(self, m): """Add token to pass through mutiline math.""" - self.tokens.append({ - "type": "multiline_math", - "text": m.group(0) - }) + self.tokens.append({"type": "multiline_math", "text": m.group(0)}) class MathInlineGrammar(mistune.InlineGrammar): """This defines different ways of declaring math objects that should be passed through to mathjax unaffected. These are used by the MathInlineLexer. """ + inline_math = re.compile(r"^\$(.+?)\$|^\\\\\((.+?)\\\\\)", re.DOTALL) block_math = re.compile(r"^\$\$(.*?)\$\$|^\\\\\[(.*?)\\\\\]", re.DOTALL) - latex_environment = re.compile(r"^\\begin\{([a-z]*\*?)\}(.*?)\\end\{\1\}", - re.DOTALL) - text = re.compile(r'^[\s\S]+?(?=[\\%s\n' % \ - mistune.escape(code) + return "\n
%s
\n" % mistune.escape(code) formatter = HtmlFormatter() return highlight(code, lexer, formatter) def block_html(self, html): - embed_images = self.options.get('embed_images', False) + embed_images = self.options.get("embed_images", False) if embed_images: html = self._html_embed_images(html) @@ -146,7 +140,7 @@ return super().block_html(html) def inline_html(self, html): - embed_images = self.options.get('embed_images', False) + embed_images = self.options.get("embed_images", False) if embed_images: html = self._html_embed_images(html) @@ -157,22 +151,22 @@ html = super().header(text, level, raw=raw) if self.options.get("exclude_anchor_links"): return html - anchor_link_text = self.options.get('anchor_link_text', u'¶') + anchor_link_text = self.options.get("anchor_link_text", "¶") return add_anchor(html, anchor_link_text=anchor_link_text) def escape_html(self, text): return html_escape(text) def block_math(self, text): - return '$$%s$$' % self.escape_html(text) + return "$$%s$$" % self.escape_html(text) def latex_environment(self, name, text): name = self.escape_html(name) text = self.escape_html(text) - return r'\begin{%s}%s\end{%s}' % (name, text, name) + return rf"\begin{{{name}}}{text}\end{{{name}}}" def inline_math(self, text): - return '$%s$' % self.escape_html(text) + return "$%s$" % self.escape_html(text) def image(self, src, title, text): """Rendering a image with title and text. @@ -181,19 +175,19 @@ :param title: title text of the image. :param text: alt text of the image. """ - attachments = self.options.get('attachments', {}) - attachment_prefix = 'attachment:' - embed_images = self.options.get('embed_images', False) + attachments = self.options.get("attachments", {}) + attachment_prefix = "attachment:" + embed_images = self.options.get("embed_images", False) if src.startswith(attachment_prefix): - name = src[len(attachment_prefix):] + name = src[len(attachment_prefix) :] if name not in attachments: - raise InvalidNotebook("missing attachment: {}".format(name)) + raise InvalidNotebook(f"missing attachment: {name}") attachment = attachments[name] # we choose vector over raster, and lossless over lossy - preferred_mime_types = ['image/svg+xml', 'image/png', 'image/jpeg'] + preferred_mime_types = ["image/svg+xml", "image/png", "image/jpeg"] for preferred_mime_type in preferred_mime_types: if preferred_mime_type in attachment: break @@ -201,7 +195,7 @@ preferred_mime_type = list(attachment.keys())[0] mime_type = preferred_mime_type data = attachment[mime_type] - src = 'data:' + mime_type + ';base64,' + data + src = "data:" + mime_type + ";base64," + data elif embed_images: base64_url = self._src_to_base64(src) @@ -217,38 +211,37 @@ :param src: source link of the file. :return: the base64 url or None if the file was not found. """ - path = self.options.get('path', '') + path = self.options.get("path", "") src_path = os.path.join(path, src) if not os.path.exists(src_path): return None - with open(src_path, 'rb') as fobj: + with open(src_path, "rb") as fobj: mime_type = mimetypes.guess_type(src_path)[0] base64_data = base64.b64encode(fobj.read()) - base64_data = base64_data.replace(b'\n', b'').decode('ascii') + base64_data = base64_data.replace(b"\n", b"").decode("ascii") - return 'data:{};base64,{}'.format(mime_type, base64_data) + return f"data:{mime_type};base64,{base64_data}" def _html_embed_images(self, html): parsed_html = bs4.BeautifulSoup(html, features="html.parser") - imgs = parsed_html.find_all('img') + imgs = parsed_html.find_all("img") # Replace img tags's sources by base64 dataurls for img in imgs: - if 'src' not in img.attrs: + if "src" not in img.attrs: continue - base64_url = self._src_to_base64(img.attrs['src']) + base64_url = self._src_to_base64(img.attrs["src"]) if base64_url is not None: - img.attrs['src'] = base64_url + img.attrs["src"] = base64_url return str(parsed_html) def markdown2html_mistune(source): """Convert a markdown string to HTML using mistune""" - return MarkdownWithMath(renderer=IPythonRenderer( - escape=False)).render(source) + return MarkdownWithMath(renderer=IPythonRenderer(escape=False)).render(source) diff -Nru nbconvert-6.4.4/nbconvert/filters/markdown.py nbconvert-6.5.3/nbconvert/filters/markdown.py --- nbconvert-6.4.4/nbconvert/filters/markdown.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/markdown.py 2022-08-11 11:50:51.000000000 +0000 @@ -6,7 +6,7 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function + import re try: @@ -17,23 +17,22 @@ def markdown2html_mistune(source): """mistune is unavailable, raise ImportError""" - raise ImportError("markdown2html requires mistune: %s" - % _mistune_import_error) + raise ImportError("markdown2html requires mistune: %s" % _mistune_import_error) -from .pandoc import convert_pandoc +from .pandoc import convert_pandoc __all__ = [ - 'markdown2html', - 'markdown2html_pandoc', - 'markdown2html_mistune', - 'markdown2latex', - 'markdown2rst', - 'markdown2asciidoc', + "markdown2html", + "markdown2html_pandoc", + "markdown2html_mistune", + "markdown2latex", + "markdown2rst", + "markdown2asciidoc", ] -def markdown2latex(source, markup='markdown', extra_args=None): +def markdown2latex(source, markup="markdown", extra_args=None): """ Convert a markdown string to LaTeX via pandoc. @@ -54,27 +53,26 @@ out : string Output as returned by pandoc. """ - return convert_pandoc(source, markup, 'latex', extra_args=extra_args) + return convert_pandoc(source, markup, "latex", extra_args=extra_args) def markdown2html_pandoc(source, extra_args=None): """ Convert a markdown string to HTML via pandoc. """ - extra_args = extra_args or ['--mathjax'] - return convert_pandoc(source, 'markdown', 'html', extra_args=extra_args) + extra_args = extra_args or ["--mathjax"] + return convert_pandoc(source, "markdown", "html", extra_args=extra_args) def markdown2asciidoc(source, extra_args=None): """Convert a markdown string to asciidoc via pandoc""" - extra_args = extra_args or ['--atx-headers'] - asciidoc = convert_pandoc(source, 'markdown', 'asciidoc', - extra_args=extra_args) + extra_args = extra_args or ["--atx-headers"] + asciidoc = convert_pandoc(source, "markdown", "asciidoc", extra_args=extra_args) # workaround for https://github.com/jgm/pandoc/issues/3068 if "__" in asciidoc: - asciidoc = re.sub(r'\b__([\w \n-]+)__([:,.\n\)])', r'_\1_\2', asciidoc) + asciidoc = re.sub(r"\b__([\w \n-]+)__([:,.\n\)])", r"_\1_\2", asciidoc) # urls / links: - asciidoc = re.sub(r'\(__([\w\/-:\.]+)__\)', r'(_\1_)', asciidoc) + asciidoc = re.sub(r"\(__([\w\/-:\.]+)__\)", r"(_\1_)", asciidoc) return asciidoc @@ -100,4 +98,4 @@ out : string Output as returned by pandoc. """ - return convert_pandoc(source, 'markdown', 'rst', extra_args=extra_args) + return convert_pandoc(source, "markdown", "rst", extra_args=extra_args) diff -Nru nbconvert-6.4.4/nbconvert/filters/metadata.py nbconvert-6.5.3/nbconvert/filters/metadata.py --- nbconvert-6.4.4/nbconvert/filters/metadata.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/metadata.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,5 +1,6 @@ """filters for metadata""" + def get_metadata(output, key, mimetype=None): """Resolve an output metadata key @@ -8,7 +9,7 @@ Otherwise, just resolve at top-level. Returns None if no data found. """ - md = output.get('metadata') or {} + md = output.get("metadata") or {} if mimetype and mimetype in md: value = md[mimetype].get(key) if value is not None: diff -Nru nbconvert-6.4.4/nbconvert/filters/strings.py nbconvert-6.5.3/nbconvert/filters/strings.py --- nbconvert-6.4.4/nbconvert/filters/strings.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/strings.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,4 +1,3 @@ -# coding: utf-8 """String filters. Contains a collection of useful string manipulation filters for use in Jinja @@ -8,35 +7,33 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. +import base64 import os import re import textwrap import warnings -import base64 - from urllib.parse import quote +from xml.etree.ElementTree import Element # defusedxml does safe(r) parsing of untrusted XML data from defusedxml import ElementTree -from xml.etree.ElementTree import Element - __all__ = [ - 'wrap_text', - 'html2text', - 'add_anchor', - 'strip_dollars', - 'strip_files_prefix', - 'comment_lines', - 'get_lines', - 'ipython2python', - 'posix_path', - 'path2url', - 'add_prompts', - 'ascii_only', - 'prevent_list_blocks', - 'strip_trailing_newline', - 'text_base64', + "wrap_text", + "html2text", + "add_anchor", + "strip_dollars", + "strip_files_prefix", + "comment_lines", + "get_lines", + "ipython2python", + "posix_path", + "path2url", + "add_prompts", + "ascii_only", + "prevent_list_blocks", + "strip_trailing_newline", + "text_base64", ] @@ -53,10 +50,10 @@ Number of characters to wrap to, default 100. """ - split_text = text.split('\n') - wrp = map(lambda x:textwrap.wrap(x,width), split_text) - wrpd = map('\n'.join, wrp) - return '\n'.join(wrpd) + split_text = text.split("\n") + wrp = map(lambda x: textwrap.wrap(x, width), split_text) + wrpd = map("\n".join, wrp) + return "\n".join(wrpd) def html2text(element): @@ -74,7 +71,7 @@ text = element.text or "" for child in element: text += html2text(child) - text += (element.tail or "") + text += element.tail or "" return text @@ -88,10 +85,10 @@ # Valid IDs need to be non-empty and contain no space characters, but are otherwise arbitrary. # However, these IDs are also used in URL fragments, which are more restrictive, so we URL # encode any characters that are not valid in URL fragments. - return quote(header_contents.replace(' ', '-'), safe="?/:@!$&'()*+,;=") + return quote(header_contents.replace(" ", "-"), safe="?/:@!$&'()*+,;=") -def add_anchor(html, anchor_link_text=u'¶'): +def add_anchor(html, anchor_link_text="¶"): """Add an id and an anchor-link to an html header For use on markdown headings @@ -102,7 +99,7 @@ # failed to parse, just return it unmodified return html link = _convert_header_id(html2text(h)) - h.set('id', link) + h.set("id", link) a = Element("a", {"class": "anchor-link", "href": "#" + link}) try: # Test if the anchor link text is HTML (e.g. an image) @@ -112,17 +109,17 @@ a.text = anchor_link_text h.append(a) - return ElementTree.tostring(h).decode(encoding='utf-8') + return ElementTree.tostring(h).decode(encoding="utf-8") -def add_prompts(code, first='>>> ', cont='... '): +def add_prompts(code, first=">>> ", cont="... "): """Add prompts to code snippets""" new_code = [] - code_list = code.split('\n') + code_list = code.split("\n") new_code.append(first + code_list[0]) for line in code_list[1:]: new_code.append(cont + line) - return '\n'.join(new_code) + return "\n".join(new_code) def strip_dollars(text): @@ -135,11 +132,12 @@ Text to remove dollars from """ - return text.strip('$') + return text.strip("$") files_url_pattern = re.compile(r'(src|href)\=([\'"]?)/?files/') -markdown_url_pattern = re.compile(r'(!?)\[(?P.*?)\]\(/?files/(?P.*?)\)') +markdown_url_pattern = re.compile(r"(!?)\[(?P.*?)\]\(/?files/(?P.*?)\)") + def strip_files_prefix(text): """ @@ -152,11 +150,11 @@ Text in which to replace 'src="files/real...' with 'src="real...' """ cleaned_text = files_url_pattern.sub(r"\1=\2", text) - cleaned_text = markdown_url_pattern.sub(r'\1[\2](\3)', cleaned_text) + cleaned_text = markdown_url_pattern.sub(r"\1[\2](\3)", cleaned_text) return cleaned_text -def comment_lines(text, prefix='# '): +def comment_lines(text, prefix="# "): """ Build a Python comment line from input text. @@ -168,13 +166,13 @@ Character to append to the start of each line. """ - #Replace line breaks with line breaks and comment symbols. - #Also add a comment symbol at the beginning to comment out - #the first line. - return prefix + ('\n'+prefix).join(text.split('\n')) + # Replace line breaks with line breaks and comment symbols. + # Also add a comment symbol at the beginning to comment out + # the first line. + return prefix + ("\n" + prefix).join(text.split("\n")) -def get_lines(text, start=None,end=None): +def get_lines(text, start=None, end=None): """ Split the input text into separate lines and then return the lines that the caller is interested in. @@ -193,7 +191,8 @@ lines = text.split("\n") # Return the right lines. - return "\n".join(lines[start:end]) #re-join + return "\n".join(lines[start:end]) # re-join + def ipython2python(code): """Transform IPython syntax to pure Python syntax @@ -204,7 +203,7 @@ IPython code, to be transformed to pure Python """ try: - from IPython.core.inputsplitter import IPythonInputSplitter + from IPython.core.inputtransformer2 import TransformerManager except ImportError: warnings.warn( "IPython is needed to transform IPython syntax to pure Python." @@ -212,46 +211,52 @@ ) return code else: - isp = IPythonInputSplitter(line_input_checker=False) + isp = TransformerManager() return isp.transform_cell(code) + def posix_path(path): """Turn a path into posix-style path/to/etc Mainly for use in latex on Windows, where native Windows paths are not allowed. """ - if os.path.sep != '/': - return path.replace(os.path.sep, '/') + if os.path.sep != "/": + return path.replace(os.path.sep, "/") return path + def path2url(path): """Turn a file path into a URL""" parts = path.split(os.path.sep) - return '/'.join(quote(part) for part in parts) + return "/".join(quote(part) for part in parts) + def ascii_only(s): """ensure a string is ascii""" - return s.encode('ascii', 'replace').decode('ascii') + return s.encode("ascii", "replace").decode("ascii") + def prevent_list_blocks(s): """ Prevent presence of enumerate or itemize blocks in latex headings cells """ - out = re.sub(r'(^\s*\d*)\.', r'\1\.', s) - out = re.sub(r'(^\s*)\-', r'\1\-', out) - out = re.sub(r'(^\s*)\+', r'\1\+', out) - out = re.sub(r'(^\s*)\*', r'\1\*', out) + out = re.sub(r"(^\s*\d*)\.", r"\1\.", s) + out = re.sub(r"(^\s*)\-", r"\1\-", out) + out = re.sub(r"(^\s*)\+", r"\1\+", out) + out = re.sub(r"(^\s*)\*", r"\1\*", out) return out + def strip_trailing_newline(text): """ Strips a newline from the end of text. """ - if text.endswith('\n'): + if text.endswith("\n"): text = text[:-1] return text + def text_base64(text): """ Encode base64 text diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_ansi.py nbconvert-6.5.3/nbconvert/filters/tests/test_ansi.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_ansi.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_ansi.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,4 +1,3 @@ -# coding: utf-8 """ Module with tests for ansi filters """ @@ -6,10 +5,9 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import unicode_literals from ...tests.base import TestsBase -from ..ansi import strip_ansi, ansi2html, ansi2latex +from ..ansi import ansi2html, ansi2latex, strip_ansi class TestAnsi(TestsBase): @@ -18,13 +16,13 @@ def test_strip_ansi(self): """strip_ansi test""" correct_outputs = { - '\x1b[32m\x1b[1m\x1b[0;44m\x1b[38;2;255;0;255m\x1b[;m\x1b[m': '', - 'hello\x1b[000;34m': 'hello', - 'he\x1b[1;33m\x1b[;36mllo': 'hello', - '\x1b[;34mhello': 'hello', - '\x1b[31mh\x1b[31me\x1b[31ml\x1b[31ml\x1b[31mo\x1b[31m': 'hello', - 'hel\x1b[;00;;032;;;32mlo': 'hello', - 'hello': 'hello', + "\x1b[32m\x1b[1m\x1b[0;44m\x1b[38;2;255;0;255m\x1b[;m\x1b[m": "", + "hello\x1b[000;34m": "hello", + "he\x1b[1;33m\x1b[;36mllo": "hello", + "\x1b[;34mhello": "hello", + "\x1b[31mh\x1b[31me\x1b[31ml\x1b[31ml\x1b[31mo\x1b[31m": "hello", + "hel\x1b[;00;;032;;;32mlo": "hello", + "hello": "hello", } for inval, outval in correct_outputs.items(): @@ -33,17 +31,17 @@ def test_ansi2html(self): """ansi2html test""" correct_outputs = { - '\x1b[31m': '', - 'hello\x1b[34m': 'hello', - 'he\x1b[32m\x1b[36mllo': 'hello', - '\x1b[1;33mhello': 'hello', - '\x1b[37mh\x1b[0;037me\x1b[;0037ml\x1b[00;37ml\x1b[;;37mo': 'hello', - 'hel\x1b[0;32mlo': 'hello', - 'hellø': 'hellø', - '\x1b[1mhello\x1b[33mworld\x1b[0m': 'helloworld', - 'he\x1b[4mll\x1b[24mo': 'hello', - '\x1b[35mhe\x1b[7mll\x1b[27mo': 'hello', - '\x1b[44mhe\x1b[7mll\x1b[27mo': 'hello', + "\x1b[31m": "", + "hello\x1b[34m": "hello", + "he\x1b[32m\x1b[36mllo": 'hello', + "\x1b[1;33mhello": 'hello', + "\x1b[37mh\x1b[0;037me\x1b[;0037ml\x1b[00;37ml\x1b[;;37mo": 'hello', + "hel\x1b[0;32mlo": 'hello', + "hellø": "hellø", + "\x1b[1mhello\x1b[33mworld\x1b[0m": 'helloworld', + "he\x1b[4mll\x1b[24mo": 'hello', + "\x1b[35mhe\x1b[7mll\x1b[27mo": 'hello', + "\x1b[44mhe\x1b[7mll\x1b[27mo": 'hello', } for inval, outval in correct_outputs.items(): @@ -52,21 +50,21 @@ def test_ansi2latex(self): """ansi2latex test""" correct_outputs = { - '\x1b[31m': '', - 'hello\x1b[34m': 'hello', - 'he\x1b[32m\x1b[36mllo': r'he\textcolor{ansi-cyan}{llo}', - '\x1b[1;33mhello': r'\textcolor{ansi-yellow-intense}{\textbf{hello}}', - '\x1b[37mh\x1b[0;037me\x1b[;0037ml\x1b[00;37ml\x1b[;;37mo': r'\textcolor{ansi-white}{h}\textcolor{ansi-white}{e}\textcolor{ansi-white}{l}\textcolor{ansi-white}{l}\textcolor{ansi-white}{o}', - 'hel\x1b[0;32mlo': r'hel\textcolor{ansi-green}{lo}', - 'hello': 'hello', - 'hello\x1b[34mthere\x1b[mworld': r'hello\textcolor{ansi-blue}{there}world', - 'hello\x1b[mthere': 'hellothere', - 'hello\x1b[01;34mthere': r'hello\textcolor{ansi-blue-intense}{\textbf{there}}', - 'hello\x1b[001;34mthere': r'hello\textcolor{ansi-blue-intense}{\textbf{there}}', - '\x1b[1mhello\x1b[33mworld\x1b[0m': r'\textbf{hello}\textcolor{ansi-yellow-intense}{\textbf{world}}', - 'he\x1b[4mll\x1b[24mo': 'he\\underline{ll}o', - '\x1b[35mhe\x1b[7mll\x1b[27mo': r'\textcolor{ansi-magenta}{he}\textcolor{ansi-default-inverse-fg}{\setlength{\fboxsep}{0pt}\colorbox{ansi-magenta}{ll\strut}}\textcolor{ansi-magenta}{o}', - '\x1b[44mhe\x1b[7mll\x1b[27mo': r'\setlength{\fboxsep}{0pt}\colorbox{ansi-blue}{he\strut}\textcolor{ansi-blue}{\setlength{\fboxsep}{0pt}\colorbox{ansi-default-inverse-bg}{ll\strut}}\setlength{\fboxsep}{0pt}\colorbox{ansi-blue}{o\strut}', + "\x1b[31m": "", + "hello\x1b[34m": "hello", + "he\x1b[32m\x1b[36mllo": r"he\textcolor{ansi-cyan}{llo}", + "\x1b[1;33mhello": r"\textcolor{ansi-yellow-intense}{\textbf{hello}}", + "\x1b[37mh\x1b[0;037me\x1b[;0037ml\x1b[00;37ml\x1b[;;37mo": r"\textcolor{ansi-white}{h}\textcolor{ansi-white}{e}\textcolor{ansi-white}{l}\textcolor{ansi-white}{l}\textcolor{ansi-white}{o}", + "hel\x1b[0;32mlo": r"hel\textcolor{ansi-green}{lo}", + "hello": "hello", + "hello\x1b[34mthere\x1b[mworld": r"hello\textcolor{ansi-blue}{there}world", + "hello\x1b[mthere": "hellothere", + "hello\x1b[01;34mthere": r"hello\textcolor{ansi-blue-intense}{\textbf{there}}", + "hello\x1b[001;34mthere": r"hello\textcolor{ansi-blue-intense}{\textbf{there}}", + "\x1b[1mhello\x1b[33mworld\x1b[0m": r"\textbf{hello}\textcolor{ansi-yellow-intense}{\textbf{world}}", + "he\x1b[4mll\x1b[24mo": "he\\underline{ll}o", + "\x1b[35mhe\x1b[7mll\x1b[27mo": r"\textcolor{ansi-magenta}{he}\textcolor{ansi-default-inverse-fg}{\setlength{\fboxsep}{0pt}\colorbox{ansi-magenta}{ll\strut}}\textcolor{ansi-magenta}{o}", + "\x1b[44mhe\x1b[7mll\x1b[27mo": r"\setlength{\fboxsep}{0pt}\colorbox{ansi-blue}{he\strut}\textcolor{ansi-blue}{\setlength{\fboxsep}{0pt}\colorbox{ansi-default-inverse-bg}{ll\strut}}\setlength{\fboxsep}{0pt}\colorbox{ansi-blue}{o\strut}", } for inval, outval in correct_outputs.items(): diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_citation.py nbconvert-6.5.3/nbconvert/filters/tests/test_citation.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_citation.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_citation.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,21 +1,23 @@ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +import pytest + +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- from ..citation import citation2latex -import pytest -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Tests -#----------------------------------------------------------------------------- -test_md = {""" +# ----------------------------------------------------------------------------- +test_md = { + """ # My Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac magna non augue @@ -30,7 +32,7 @@ * One Jonathan. * Two Matthias. * Three Paul. -""": r""" +""": r""" # My Heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac magna non augue @@ -46,107 +48,73 @@ * Two \cite{carreau}. * Three \cite{ivanov}. """, - -# No citations -r"""The quick brown fox jumps over the lazy dog.""": -r"""The quick brown fox jumps over the lazy dog.""", - -# Simple inline -r"""Foo Text bar""": -r"""Foo \cite{asdf} bar""", - -# Multiline -r"""Text -Foo""": -r"""\cite{ewqr}Foo""", - -# Nested tags -r"""
Text
Bar""": -r"""
\cite{Foo}
Bar""", - -# Including Maths -r"""Foo $3*2*1$
Text
Bar""": -r"""Foo $3*2*1$ \cite{Foo} Bar""", - -# Missing end tag -r"""Test Foo""": -r"""\cite{asdf}""", - -r"""Test Foo""": -r"""\cite{asdf}""", - -r"""Test Foo""": -r"""\cite{asdf}""", - -# Multiple arguments -r"""Test Foo""": -r"""\cite{asdf} Foo""", - -# Wrong capitalization -r"""Test Foo""": -r"""\cite{asdf} Foo""", - -r"""Test Foo""": -r"""\cite{asdf} Foo""", - -# Wrong end tag -r""" ksjfs sdf ds """: -r"""\cite{wer}""", - -r"""""": -r"""\cite{wer}""", - -# Invalid tag names -r""" """: -r""" \cite{wer}""", - -# Non-nested tags -r"""

Test Foo

""": -r"""

\cite{asdf}Test Foo

""", - -# LXML errors -r"""Foo + # No citations + r"""The quick brown fox jumps over the lazy dog.""": r"""The quick brown fox jumps over the lazy dog.""", + # Simple inline + r"""Foo Text bar""": r"""Foo \cite{asdf} bar""", + # Multiline + r"""Text +Foo""": r"""\cite{ewqr}Foo""", + # Nested tags + r"""
Text
Bar""": r"""
\cite{Foo}
Bar""", + # Including Maths + r"""Foo $3*2*1$
Text
Bar""": r"""Foo $3*2*1$ \cite{Foo} Bar""", + # Missing end tag + r"""Test Foo""": r"""\cite{asdf}""", + r"""Test Foo""": r"""\cite{asdf}""", + r"""Test Foo""": r"""\cite{asdf}""", + # Multiple arguments + r"""Test Foo""": r"""\cite{asdf} Foo""", + # Wrong capitalization + r"""Test Foo""": r"""\cite{asdf} Foo""", + r"""Test Foo""": r"""\cite{asdf} Foo""", + # Wrong end tag + r""" ksjfs sdf ds """: r"""\cite{wer}""", + r"""""": r"""\cite{wer}""", + # Invalid tag names + r""" """: r""" \cite{wer}""", + # Non-nested tags + r"""

Test Foo

""": r"""

\cite{asdf}Test Foo

""", + # LXML errors + r"""Foo \begin{eqnarray} 1 & bar1 \\ 3 & 4 \\ -\end{eqnarray}""": -r"""Foo +\end{eqnarray}""": r"""Foo \begin{eqnarray} 1 & \cite{bar} \\ 3 & 4 \\ \end{eqnarray}""", - -r""" + r""" 1<2 is true, but 3>4 is false. $1<2$ is true, but $3>4$ is false. -1<2 it is even worse if it is alone in a line.""": -r""" +1<2 it is even worse if it is alone in a line.""": r""" 1<2 is true, but 3>4 is false. $1<2$ is true, but $3>4$ is false. 1<2 it is even worse if it is alone in a line.""", - -r""" + r""" 1 < 2 is true, but 3 > 4 is false $1 < 2$ is true, but $3 > 4$ is false 1 < 2 it is even worse if it is alone in a line. -""": -r""" +""": r""" 1 < 2 is true, but 3 > 4 is false $1 < 2$ is true, but $3 > 4$ is false 1 < 2 it is even worse if it is alone in a line. -"""} +""", +} -@pytest.mark.parametrize(["in_arg", "out_arg"], [ - (in_arg, out_arg) for (in_arg, out_arg) in test_md.items()]) +@pytest.mark.parametrize( + ["in_arg", "out_arg"], [(in_arg, out_arg) for (in_arg, out_arg) in test_md.items()] +) def test_citation2latex(in_arg, out_arg): """Are citations parsed properly?""" - assert citation2latex(in_arg)==out_arg + assert citation2latex(in_arg) == out_arg diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_datatypefilter.py nbconvert-6.5.3/nbconvert/filters/tests/test_datatypefilter.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_datatypefilter.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_datatypefilter.py 2022-08-11 11:50:51.000000000 +0000 @@ -2,6 +2,7 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. +import pytest from ...tests.base import TestsBase from ..datatypefilter import DataTypeFilter @@ -17,11 +18,27 @@ def test_junk_types(self): """Can the DataTypeFilter pickout a useful type from a dict with junk types as keys?""" filter = DataTypeFilter() - assert "image/png" in filter({"hair":"1", "water":2, "image/png":3, "rock":4.0}) - assert "application/pdf" in filter({"application/pdf":"file_path", "hair":2, "water":"yay", "png":'not a png', "rock":'is a rock'}) - self.assertEqual(filter({"hair":"this is not", "water":"going to return anything", "rock":"or is it"}), []) + assert "image/png" in filter({"hair": "1", "water": 2, "image/png": 3, "rock": 4.0}) + assert "application/pdf" in filter( + { + "application/pdf": "file_path", + "hair": 2, + "water": "yay", + "png": "not a png", + "rock": "is a rock", + } + ) + + with pytest.warns(UserWarning): + self.assertEqual( + filter( + {"hair": "this is not", "water": "going to return anything", "rock": "or is it"} + ), + [], + ) def test_null(self): """Will the DataTypeFilter fail if no types are passed in?""" filter = DataTypeFilter() - self.assertEqual(filter({}), []) + with pytest.warns(UserWarning): + self.assertEqual(filter({}), []) diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_highlight.py nbconvert-6.5.3/nbconvert/filters/tests/test_highlight.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_highlight.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_highlight.py 2022-08-11 11:50:51.000000000 +0000 @@ -2,35 +2,38 @@ Module with tests for Highlight """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + +import xml + +import pytest from ...tests.base import TestsBase from ..highlight import Highlight2HTML, Highlight2Latex -from traitlets.config import Config -import xml -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Class -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- highlight2html = Highlight2HTML() highlight2latex = Highlight2Latex() -highlight2html_ruby = Highlight2HTML(pygments_lexer='ruby') +highlight2html_ruby = Highlight2HTML(pygments_lexer="ruby") + class TestHighlight(TestsBase): """Contains test functions for highlight.py""" - #Hello world test, magics test, blank string test + # Hello world test, magics test, blank string test tests = [ """ #Hello World Example @@ -47,20 +50,16 @@ """ %%pylab plot(x,y, 'r') - """ - ] - - tokens = [ - ['Hello World Example', 'say', 'text', 'import', 'def'], - ['pylab', 'plot']] + """, + ] + tokens = [["Hello World Example", "say", "text", "import", "def"], ["pylab", "plot"]] def test_highlight2html(self): """highlight2html test""" for index, test in enumerate(self.tests): self._try_highlight(highlight2html, test, self.tokens[index]) - def test_highlight2latex(self): """highlight2latex test""" for index, test in enumerate(self.tests): @@ -68,18 +67,20 @@ def test_parse_html_many_lang(self): - ht = highlight2html(self.tests[0]) - rb = highlight2html_ruby(self.tests[0]) + ht = highlight2html(self.tests[0]) + rb = highlight2html_ruby(self.tests[0]) - for lang,tkns in [ - ( ht, ('def', )), - ( rb, ('def','end' ) ) - ]: + for lang, tkns in [(ht, ("def",)), (rb, ("def", "end"))]: root = xml.etree.ElementTree.fromstring(lang) - self.assertEqual(self._extract_tokens(root,'k'), set(tkns)) + self.assertEqual(self._extract_tokens(root, "k"), set(tkns)) + + @pytest.mark.filterwarnings("ignore") + def test_inject_html(self): + out = highlight2html(self.tests[0], 'ipython3-foo">') + assert "" not in out def _extract_tokens(self, root, cls): - return set(map(lambda x:x.text,root.findall(".//*[@class='"+cls+"']"))) + return set(map(lambda x: x.text, root.findall(".//*[@class='" + cls + "']"))) def _try_highlight(self, method, test, tokens): """Try highlighting source, look for key tokens""" diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_latex.py nbconvert-6.5.3/nbconvert/filters/tests/test_latex.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_latex.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_latex.py 2022-08-11 11:50:51.000000000 +0000 @@ -2,42 +2,46 @@ Module with tests for Latex """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- from ...tests.base import TestsBase from ..latex import escape_latex - -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Class -#----------------------------------------------------------------------------- - -class TestLatex(TestsBase): +# ----------------------------------------------------------------------------- +class TestLatex(TestsBase): def test_escape_latex(self): """escape_latex test""" tests = [ - (r'How are \you doing today?', r'How are \textbackslash{}you doing today?'), - (r'\escapechar=`\A\catcode`\|=0 |string|foo', r'\textbackslash{}escapechar=`\textbackslash{}A\textbackslash{}catcode`\textbackslash{}|=0 |string|foo'), - (r'# $ % & ~ _ ^ \ { }', r'\# \$ \% \& \textasciitilde{} \_ \^{} \textbackslash{} \{ \}'), - ('...', r'{\ldots}'), - ('','')] + (r"How are \you doing today?", r"How are \textbackslash{}you doing today?"), + ( + r"\escapechar=`\A\catcode`\|=0 |string|foo", + r"\textbackslash{}escapechar=`\textbackslash{}A\textbackslash{}catcode`\textbackslash{}|=0 |string|foo", + ), + ( + r"# $ % & ~ _ ^ \ { }", + r"\# \$ \% \& \textasciitilde{} \_ \^{} \textbackslash{} \{ \}", + ), + ("...", r"{\ldots}"), + ("", ""), + ] for test in tests: self._try_escape_latex(test[0], test[1]) - def _try_escape_latex(self, test, result): """Try to remove latex from string""" self.assertEqual(escape_latex(test), result) diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_markdown.py nbconvert-6.5.3/nbconvert/filters/tests/test_markdown.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_markdown.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_markdown.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,4 +1,3 @@ -# coding: utf-8 """Tests for conversions from markdown to other formats""" # Copyright (c) IPython Development Team. @@ -9,95 +8,98 @@ from functools import partial from html import unescape -from ...tests.utils import onlyif_cmds_exist +from jinja2 import Environment + from ...tests.base import TestsBase -from ..pandoc import convert_pandoc +from ...tests.utils import onlyif_cmds_exist from ..markdown import markdown2html - -from jinja2 import Environment +from ..pandoc import convert_pandoc class TestMarkdown(TestsBase): tests = [ - '*test', - '**test', - '*test*', - '_test_', - '__test__', - '__*test*__', - '**test**', - '#test', - '##test', - 'test\n----', - 'test [link](https://google.com/)', + "*test", + "**test", + "*test*", + "_test_", + "__test__", + "__*test*__", + "**test**", + "#test", + "##test", + "test\n----", + "test [link](https://google.com/)", ] tokens = [ - '*test', - '**test', - 'test', - 'test', - 'test', - 'test', - 'test', - 'test', - 'test', - 'test', - ('test', 'https://google.com/'), + "*test", + "**test", + "test", + "test", + "test", + "test", + "test", + "test", + "test", + "test", + ("test", "https://google.com/"), ] - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_markdown2latex(self): """markdown2latex test""" for index, test in enumerate(self.tests): self._try_markdown( - partial( - convert_pandoc, from_format='markdown', to_format='latex'), - test, self.tokens[index]) + partial(convert_pandoc, from_format="markdown", to_format="latex"), + test, + self.tokens[index], + ) - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_markdown2latex_markup(self): """markdown2latex with markup kwarg test""" # This string should be passed through unaltered with pandoc's # markdown_strict reader - s = '1) arabic number with parenthesis' - self.assertEqual(convert_pandoc(s, 'markdown_strict', 'latex'), s) + s = "1) arabic number with parenthesis" + self.assertEqual(convert_pandoc(s, "markdown_strict", "latex"), s) # This string should be passed through unaltered with pandoc's # markdown_strict+tex_math_dollars reader - s = r'$\alpha$ latex math' + s = r"$\alpha$ latex math" # sometimes pandoc uses $math$, sometimes it uses \(math\) - expected = re.compile(r'(\$|\\\()\\alpha(\$|\\\)) latex math') + expected = re.compile(r"(\$|\\\()\\alpha(\$|\\\)) latex math") assertRegex = self.assertRegex - assertRegex( - convert_pandoc(s, 'markdown_strict+tex_math_dollars', 'latex'), - expected) + assertRegex(convert_pandoc(s, "markdown_strict+tex_math_dollars", "latex"), expected) - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_pandoc_extra_args(self): # pass --no-wrap - s = '\n'.join([ - "#latex {{long_line | md2l(['--wrap=none'])}}", - "#rst {{long_line | md2r(['--columns', '5'])}}", - ]) - long_line = ' '.join(['long'] * 30) + s = "\n".join( + [ + "#latex {{long_line | md2l(['--wrap=none'])}}", + "#rst {{long_line | md2r(['--columns', '5'])}}", + ] + ) + long_line = " ".join(["long"] * 30) env = Environment() - env.filters.update({ - 'md2l': lambda code, extra_args: convert_pandoc( - code, from_format='markdown', to_format='latex', - extra_args=extra_args), - 'md2r': lambda code, extra_args: convert_pandoc( - code, from_format='markdown', to_format='rst', - extra_args=extra_args), - }) + env.filters.update( + { + "md2l": lambda code, extra_args: convert_pandoc( + code, from_format="markdown", to_format="latex", extra_args=extra_args + ), + "md2r": lambda code, extra_args: convert_pandoc( + code, from_format="markdown", to_format="rst", extra_args=extra_args + ), + } + ) tpl = env.from_string(s) rendered = tpl.render(long_line=long_line) - _, latex, rst = rendered.split('#') + _, latex, rst = rendered.split("#") - self.assertEqual(latex.strip(), 'latex %s' % long_line) - self.assertEqual(rst.strip(), 'rst %s' % long_line.replace(' ', '\n')) + self.assertEqual(latex.strip(), "latex %s" % long_line) + self.assertEqual(rst.strip(), "rst %s" % long_line.replace(" ", "\n")) def test_markdown2html(self): """markdown2html test""" @@ -105,26 +107,30 @@ self._try_markdown(markdown2html, test, self.tokens[index]) def test_markdown2html_heading_anchors(self): - for md, tokens in [('# test', ('test', 'id="test"', - u'¶', "anchor-link")), - ('###test head space', - ('test head space', 'id="test-head-space"', - u'¶', "anchor-link"))]: + for md, tokens in [ + ("# test", ("test", 'id="test"', "¶", "anchor-link")), + ( + "###test head space", + ("test head space", 'id="test-head-space"', "¶", "anchor-link"), + ), + ]: self._try_markdown(markdown2html, md, tokens) def test_markdown2html_math(self): # Mathematical expressions not containing <, >, & # should be passed through unaltered # all the "<", ">", "&" must be escaped correctly - cases = [( - "\\begin{equation*}\n" + - ("\\left( \\sum_{k=1}^n a_k b_k \\right)^2 " - "\\leq \\left( \\sum_{k=1}^n a_k^2 \\right) " - "\\left( \\sum_{k=1}^n b_k^2 \\right)\n") + - "\\end{equation*}"), - ("$$\n" - "a = 1 *3* 5\n" - "$$"), + cases = [ + ( + "\\begin{equation*}\n" # noqa + + ( + "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 " + "\\leq \\left( \\sum_{k=1}^n a_k^2 \\right) " + "\\left( \\sum_{k=1}^n b_k^2 \\right)\n" + ) + + "\\end{equation*}" + ), + ("$$\na = 1 *3* 5\n$$"), "$ a = 1 *3* 5 $", "$s_i = s_{i}\n$", "$aa;a-b<0$$", "$$$$", - ("$$x\n" - "=\n" - "2$$"), - ("$$\n" - "b = \\left[\n" - "P\\left(\\right)\n" - "- (l_1\\leftrightarrow l_2\n)" - "\\right]\n" - "$$"), - ("\\begin{equation*}\n" - "x = 2 *55* 7\n" - "\\end{equation*}"), + ("$$x\n=\n2$$"), + ( + "$$\n" + "b = \\left[\n" + "P\\left(\\right)\n" + "- (l_1\\leftrightarrow l_2\n)" + "\\right]\n" + "$$" + ), + ("\\begin{equation*}\nx = 2 *55* 7\n\\end{equation*}"), """$ \\begin{tabular}{ l c r } 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \\ -\\end{tabular}$"""] +\\end{tabular}$""", + ] for case in cases: result = markdown2html(case) @@ -158,8 +163,8 @@ search_result = re.search(r"\$.*\$", result, re.DOTALL) if search_result is None: search_result = re.search( - "\\\\begin\\{equation.*\\}.*\\\\end\\{equation.*\\}", - result, re.DOTALL) + "\\\\begin\\{equation.*\\}.*\\\\end\\{equation.*\\}", result, re.DOTALL + ) math = search_result.group(0) # the resulting math part can not contain "<", ">" or # "&" not followed by "lt;", "gt;", or "amp;". @@ -182,9 +187,13 @@ Also check empty math blocks work correctly: $$$$ \\\\[\\\\]""" - output_check = (case.replace("_implement_", "implement") - .replace("\\\\(", "$").replace("\\\\)", "$") - .replace("\\\\[", "$$").replace("\\\\]", "$$")) + output_check = ( + case.replace("_implement_", "implement") + .replace("\\\\(", "$") + .replace("\\\\)", "$") + .replace("\\\\[", "$$") + .replace("\\\\]", "$$") + ) # these replacements are needed because we use $ and $$ in our html output self._try_markdown(markdown2html, case, output_check) @@ -213,27 +222,28 @@ $$ {\bf b}_{i}^{r}(t)=(1-t)\\,{\bf b}_{i}^{r-1}(t)+t\\,{\bf b}_{i+1}^{r-1}(t),\\: i=\\overline{0,n-r}, $$ -i.e. the $i^{th}$""" +i.e. the $i^{th}$""", ] for case in cases: s = markdown2html(case) self.assertIn(case, unescape(s)) - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_markdown2rst(self): """markdown2rst test""" - #Modify token array for rst, escape asterisk + # Modify token array for rst, escape asterisk tokens = copy(self.tokens) - tokens[0] = r'\*test' - tokens[1] = r'\**test' + tokens[0] = r"\*test" + tokens[1] = r"\**test" for index, test in enumerate(self.tests): self._try_markdown( - partial( - convert_pandoc, from_format='markdown', to_format='rst'), - test, tokens[index]) + partial(convert_pandoc, from_format="markdown", to_format="rst"), + test, + tokens[index], + ) def _try_markdown(self, method, test, tokens): results = method(test) diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_metadata.py nbconvert-6.5.3/nbconvert/filters/tests/test_metadata.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_metadata.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_metadata.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,19 +1,20 @@ from nbconvert.filters import get_metadata + def test_get_metadata(): output = { - 'metadata': { - 'width': 1, - 'height': 2, - 'image/png': { - 'unconfined': True, - 'height': 3, - } + "metadata": { + "width": 1, + "height": 2, + "image/png": { + "unconfined": True, + "height": 3, + }, } } - assert get_metadata(output, 'nowhere') is None - assert get_metadata(output, 'height') == 2 - assert get_metadata(output, 'unconfined') == None - assert get_metadata(output, 'unconfined', 'image/png') == True - assert get_metadata(output, 'width', 'image/png') == 1 - assert get_metadata(output, 'height', 'image/png') == 3 + assert get_metadata(output, "nowhere") is None + assert get_metadata(output, "height") == 2 + assert get_metadata(output, "unconfined") is None + assert get_metadata(output, "unconfined", "image/png") is True + assert get_metadata(output, "width", "image/png") == 1 + assert get_metadata(output, "height", "image/png") == 3 diff -Nru nbconvert-6.4.4/nbconvert/filters/tests/test_strings.py nbconvert-6.5.3/nbconvert/filters/tests/test_strings.py --- nbconvert-6.4.4/nbconvert/filters/tests/test_strings.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/tests/test_strings.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,35 +1,43 @@ -# -*- coding: UTF-8 -*- """ Module with tests for Strings """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- import os import re from ...tests.base import TestsBase -from ..strings import (wrap_text, html2text, add_anchor, strip_dollars, - strip_files_prefix, get_lines, comment_lines, ipython2python, posix_path, - add_prompts, prevent_list_blocks,ascii_only +from ..strings import ( + add_anchor, + add_prompts, + ascii_only, + comment_lines, + get_lines, + html2text, + ipython2python, + posix_path, + prevent_list_blocks, + strip_dollars, + strip_files_prefix, + wrap_text, ) - -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Class -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -class TestStrings(TestsBase): +class TestStrings(TestsBase): def test_wrap_text(self): """wrap_text test""" test_text = """ @@ -37,40 +45,37 @@ That thou, Iago, who hast had my purse As if the strings were thine, shouldst know of this. """ - for length in [30,5,1]: + for length in [30, 5, 1]: self._confirm_wrap_text(test_text, length) - def _confirm_wrap_text(self, text, length): - for line in wrap_text(text, length).split('\n'): + for line in wrap_text(text, length).split("\n"): assert len(line) <= length - def test_html2text(self): """html2text test""" - #TODO: More tests - self.assertEqual(html2text('joe'), 'joe') - + # TODO: More tests + self.assertEqual(html2text("joe"), "joe") def test_add_anchor(self): """add_anchor test""" - #TODO: More tests - results = add_anchor('Hello World!') - assert 'Hello World!' in results + # TODO: More tests + results = add_anchor("Hello World!") + assert "Hello World!" in results assert 'id="' in results assert 'class="anchor-link"' in results - assert '' in results + assert "" in results def test_add_anchor_fail(self): """add_anchor does nothing when it fails""" - html = '

Hello
World!

' + html = "

Hello
World!

" results = add_anchor(html) self.assertEqual(html, results) def test_add_anchor_valid_url_fragment(self): """add_anchor creates a valid URL fragment""" - results = add_anchor(r'

$\pi$ with #s and unicode 中

') + results = add_anchor(r"

$\pi$ with #s and unicode 中

") match = re.search(r'href="#(.*?)"', results) assert match assert len(match.groups()) == 1 @@ -78,66 +83,71 @@ assert len(href) > 0 # No invalid characters should be present - assert '\\' not in href - assert '#' not in href - assert '中' not in href + assert "\\" not in href + assert "#" not in href + assert "中" not in href def test_strip_dollars(self): """strip_dollars test""" tests = [ - ('', ''), - (' ', ' '), - ('$$', ''), - ('$H$', 'H'), - ('$He', 'He'), - ('H$el', 'H$el'), - ('Hell$', 'Hell'), - ('Hello', 'Hello'), - ('W$o$rld', 'W$o$rld')] + ("", ""), + (" ", " "), + ("$$", ""), + ("$H$", "H"), + ("$He", "He"), + ("H$el", "H$el"), + ("Hell$", "Hell"), + ("Hello", "Hello"), + ("W$o$rld", "W$o$rld"), + ] for test in tests: self._try_strip_dollars(test[0], test[1]) - def _try_strip_dollars(self, test, result): self.assertEqual(strip_dollars(test), result) - def test_strip_files_prefix(self): """strip_files_prefix test""" tests = [ - ('', ''), - ('/files', '/files'), - ('test="/files"', 'test="/files"'), - ('My files are in `files/`', 'My files are in `files/`'), - ('files/test.html', 'files/test.html'), - ('files/test.html', 'files/test.html'), - ("files/test.html", "files/test.html"), + ("", ""), + ("/files", "/files"), + ('test="/files"', 'test="/files"'), + ("My files are in `files/`", "My files are in `files/`"), + ( + 'files/test.html', + 'files/test.html', + ), + ( + 'files/test.html', + 'files/test.html', + ), + ( + "files/test.html", + "files/test.html", + ), ('', ''), ('', ''), - ('hello![caption]', 'hello![caption]'), - ('hello![caption](/url/location.gif)', 'hello![caption](/url/location.gif)'), - ('hello![caption](url/location.gif)', 'hello![caption](url/location.gif)'), - ('hello![caption](url/location.gif)', 'hello![caption](url/location.gif)'), - ('hello![caption](files/url/location.gif)', 'hello![caption](url/location.gif)'), - ('hello![caption](/files/url/location.gif)', 'hello![caption](url/location.gif)'), - ('hello [text](/files/url/location.gif)', 'hello [text](url/location.gif)'), - ('hello [text space](files/url/location.gif)', 'hello [text space](url/location.gif)'), + ("hello![caption]", "hello![caption]"), + ("hello![caption](/url/location.gif)", "hello![caption](/url/location.gif)"), + ("hello![caption](url/location.gif)", "hello![caption](url/location.gif)"), + ("hello![caption](url/location.gif)", "hello![caption](url/location.gif)"), + ("hello![caption](files/url/location.gif)", "hello![caption](url/location.gif)"), + ("hello![caption](/files/url/location.gif)", "hello![caption](url/location.gif)"), + ("hello [text](/files/url/location.gif)", "hello [text](url/location.gif)"), + ("hello [text space](files/url/location.gif)", "hello [text space](url/location.gif)"), ] for test in tests: self._try_files_prefix(test[0], test[1]) - def _try_files_prefix(self, test, result): self.assertEqual(strip_files_prefix(test), result) - def test_comment_lines(self): """comment_lines test""" - for line in comment_lines('hello\nworld\n!').split('\n'): - assert line.startswith('# ') - for line in comment_lines('hello\nworld\n!', 'beep').split('\n'): - assert line.startswith('beep') - + for line in comment_lines("hello\nworld\n!").split("\n"): + assert line.startswith("# ") + for line in comment_lines("hello\nworld\n!", "beep").split("\n"): + assert line.startswith("beep") def test_get_lines(self): """get_lines test""" @@ -146,23 +156,26 @@ self.assertEqual(get_lines(text, end=2), "hello\nworld") self.assertEqual(get_lines(text, start=2, end=5), "!") self.assertEqual(get_lines(text, start=-2), "world\n!") - def test_ipython2python(self): """ipython2python test""" - #TODO: More tests - results = ipython2python(u'%%pylab\nprint("Hello-World")').replace("u'", "'") - self.fuzzy_compare(results, u"get_ipython().run_cell_magic('pylab', '', 'print(\"Hello-World\")')", - ignore_spaces=True, ignore_newlines=True) - + # TODO: More tests + results = ipython2python('%%pylab\nprint("Hello-World")').replace("u'", "'") + self.fuzzy_compare( + results.replace(r"\n", ""), + "get_ipython().run_cell_magic('pylab', '', 'print(\"Hello-World\")')", + ignore_spaces=True, + ignore_newlines=True, + ) + def test_posix_path(self): """posix_path test""" - path_list = ['foo', 'bar'] - expected = '/'.join(path_list) + path_list = ["foo", "bar"] + expected = "/".join(path_list) native = os.path.join(*path_list) filtered = posix_path(native) self.assertEqual(filtered, expected) - + def test_add_prompts(self): """add_prompts test""" text1 = """for i in range(10):\n i += 1\n print i""" @@ -172,11 +185,11 @@ def test_prevent_list_blocks(self): """prevent_list_blocks test""" tests = [ - ('1. arabic point', '1\\. arabic point'), - ('* bullet asterisk', '\\* bullet asterisk'), - ('+ bullet Plus Sign', '\\+ bullet Plus Sign'), - ('- bullet Hyphen-Minus', '\\- bullet Hyphen-Minus'), - (' 1. spaces + arabic point', ' 1\\. spaces + arabic point'), + ("1. arabic point", "1\\. arabic point"), + ("* bullet asterisk", "\\* bullet asterisk"), + ("+ bullet Plus Sign", "\\+ bullet Plus Sign"), + ("- bullet Hyphen-Minus", "\\- bullet Hyphen-Minus"), + (" 1. spaces + arabic point", " 1\\. spaces + arabic point"), ] for test in tests: self.assertEqual(prevent_list_blocks(test[0]), test[1]) @@ -184,10 +197,10 @@ def test_ascii_only(self): """ascii only test""" tests = [ - ('', ''), - (' ', ' '), - ('Hello', 'Hello'), - ('Hello 中文', 'Hello ??'), + ("", ""), + (" ", " "), + ("Hello", "Hello"), + ("Hello 中文", "Hello ??"), ] for test in tests: self.assertEqual(test[1], ascii_only(test[0])) diff -Nru nbconvert-6.4.4/nbconvert/filters/widgetsdatatypefilter.py nbconvert-6.5.3/nbconvert/filters/widgetsdatatypefilter.py --- nbconvert-6.4.4/nbconvert/filters/widgetsdatatypefilter.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/filters/widgetsdatatypefilter.py 2022-08-11 11:50:51.000000000 +0000 @@ -6,45 +6,46 @@ value of the different formats is set via NbConvertBase.display_data_priority """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Classes and functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -from warnings import warn import os +from warnings import warn + from ..utils.base import NbConvertBase -__all__ = ['WidgetsDataTypeFilter'] +__all__ = ["WidgetsDataTypeFilter"] -WIDGET_VIEW_MIMETYPE = 'application/vnd.jupyter.widget-view+json' -WIDGET_STATE_MIMETYPE = 'application/vnd.jupyter.widget-state+json' +WIDGET_VIEW_MIMETYPE = "application/vnd.jupyter.widget-view+json" +WIDGET_STATE_MIMETYPE = "application/vnd.jupyter.widget-state+json" class WidgetsDataTypeFilter(NbConvertBase): - """ Returns the preferred display format, excluding the widget output if - there is no widget state available """ + """Returns the preferred display format, excluding the widget output if + there is no widget state available""" def __init__(self, notebook_metadata=None, resources=None, **kwargs): self.metadata = notebook_metadata - self.notebook_path = '' + self.notebook_path = "" if resources is not None: - name = resources.get('metadata', {}).get('name', '') - path = resources.get('metadata', {}).get('path', '') + name = resources.get("metadata", {}).get("name", "") + path = resources.get("metadata", {}).get("path", "") self.notebook_path = os.path.join(path, name) super().__init__(**kwargs) def __call__(self, output): - """ Return the first available format in the priority. + """Return the first available format in the priority. Produces a UserWarning if no compatible mimetype is found. @@ -53,22 +54,23 @@ """ metadata = self.metadata.get(self.notebook_path, {}) widgets_state = ( - metadata['widgets'][WIDGET_STATE_MIMETYPE]['state'] if - metadata.get('widgets') is not None else {} + metadata["widgets"][WIDGET_STATE_MIMETYPE]["state"] + if metadata.get("widgets") is not None + else {} ) for fmt in self.display_data_priority: if fmt in output: # If there is no widget state available, we skip this mimetype if ( - fmt == WIDGET_VIEW_MIMETYPE and - output[WIDGET_VIEW_MIMETYPE]['model_id'] not in widgets_state - ): + fmt == WIDGET_VIEW_MIMETYPE + and output[WIDGET_VIEW_MIMETYPE]["model_id"] not in widgets_state + ): continue return [fmt] - warn("Your element with mimetype(s) {mimetypes}" - " is not able to be represented.".format( - mimetypes=output.keys()) - ) + warn( + "Your element with mimetype(s) {mimetypes}" + " is not able to be represented.".format(mimetypes=output.keys()) + ) return [] diff -Nru nbconvert-6.4.4/nbconvert/__init__.py nbconvert-6.5.3/nbconvert/__init__.py --- nbconvert-6.4.4/nbconvert/__init__.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/__init__.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,8 +1,5 @@ """Utilities for converting notebooks to and from different formats.""" -from ._version import version_info, __version__ +from . import filters, postprocessors, preprocessors, writers +from ._version import __version__, version_info # noqa from .exporters import * -from . import filters -from . import preprocessors -from . import postprocessors -from . import writers diff -Nru nbconvert-6.4.4/nbconvert/__main__.py nbconvert-6.5.3/nbconvert/__main__.py --- nbconvert-6.4.4/nbconvert/__main__.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/__main__.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,2 +1,3 @@ from .nbconvertapp import main + main() diff -Nru nbconvert-6.4.4/nbconvert/nbconvertapp.py nbconvert-6.5.3/nbconvert/nbconvertapp.py --- nbconvert-6.4.4/nbconvert/nbconvertapp.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/nbconvertapp.py 2022-08-11 11:50:51.000000000 +0000 @@ -7,174 +7,205 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function +import asyncio +import glob import logging -import sys import os -import glob -import asyncio -from textwrap import fill, dedent +import sys +from textwrap import dedent, fill from jupyter_core.application import JupyterApp, base_aliases, base_flags -from nbconvert.utils.text import indent -from traitlets.config import catch_config_error, Configurable from traitlets import ( - Unicode, List, Instance, DottedObjectName, Type, Bool, - default, observe, + Bool, + DottedObjectName, + Instance, + List, + Type, + Unicode, + default, + observe, ) - +from traitlets.config import Configurable, catch_config_error from traitlets.utils.importstring import import_item -from .filters.markdown_mistune import InvalidNotebook # noqa For backward compatibility +from nbconvert import __version__, exporters, postprocessors, preprocessors, writers +from nbconvert.utils.text import indent + from .exporters.base import get_export_names, get_exporter -from nbconvert import exporters, preprocessors, writers, postprocessors, __version__ +from .filters.markdown_mistune import InvalidNotebook # noqa For backward compatibility from .utils.base import NbConvertBase from .utils.exceptions import ConversionException from .utils.io import unicode_stdin_stream -#----------------------------------------------------------------------------- -#Classes and functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- +# Classes and functions +# ----------------------------------------------------------------------------- + class DottedOrNone(DottedObjectName): """A string holding a valid dotted object name in Python, such as A.b3._c Also allows for None type. """ - default_value = u'' + + default_value = "" def validate(self, obj, value): if value is not None and len(value) > 0: return super().validate(obj, value) else: return value - + + nbconvert_aliases = {} nbconvert_aliases.update(base_aliases) -nbconvert_aliases.update({ - 'to' : 'NbConvertApp.export_format', - 'template' : 'TemplateExporter.template_name', - 'template-file' : 'TemplateExporter.template_file', - 'theme' : 'HTMLExporter.theme', - 'writer' : 'NbConvertApp.writer_class', - 'post': 'NbConvertApp.postprocessor_class', - 'output': 'NbConvertApp.output_base', - 'output-dir': 'FilesWriter.build_directory', - 'reveal-prefix': 'SlidesExporter.reveal_url_prefix', - 'nbformat': 'NotebookExporter.nbformat_version', -}) +nbconvert_aliases.update( + { + "to": "NbConvertApp.export_format", + "template": "TemplateExporter.template_name", + "template-file": "TemplateExporter.template_file", + "theme": "HTMLExporter.theme", + "sanitize_html": "HTMLExporter.sanitize_html", + "writer": "NbConvertApp.writer_class", + "post": "NbConvertApp.postprocessor_class", + "output": "NbConvertApp.output_base", + "output-dir": "FilesWriter.build_directory", + "reveal-prefix": "SlidesExporter.reveal_url_prefix", + "nbformat": "NotebookExporter.nbformat_version", + } +) nbconvert_flags = {} nbconvert_flags.update(base_flags) -nbconvert_flags.update({ - 'execute' : ( - {'ExecutePreprocessor' : {'enabled' : True}}, - "Execute the notebook prior to export." - ), - 'allow-errors' : ( - {'ExecutePreprocessor' : {'allow_errors' : True}}, - ("Continue notebook execution even if one of the cells throws " - "an error and include the error message in the cell output " - "(the default behaviour is to abort conversion). This flag " - "is only relevant if '--execute' was specified, too.") - ), - 'stdin' : ( - {'NbConvertApp' : { - 'from_stdin' : True, - } - }, - "read a single notebook file from stdin. Write the resulting notebook with default basename 'notebook.*'" - ), - 'stdout' : ( - {'NbConvertApp' : {'writer_class' : "StdoutWriter"}}, - "Write notebook output to stdout instead of files." - ), - 'inplace' : ( - { - 'NbConvertApp' : { - 'use_output_suffix' : False, - 'export_format' : 'notebook', +nbconvert_flags.update( + { + "execute": ( + {"ExecutePreprocessor": {"enabled": True}}, + "Execute the notebook prior to export.", + ), + "allow-errors": ( + {"ExecutePreprocessor": {"allow_errors": True}}, + ( + "Continue notebook execution even if one of the cells throws " + "an error and include the error message in the cell output " + "(the default behaviour is to abort conversion). This flag " + "is only relevant if '--execute' was specified, too." + ), + ), + "stdin": ( + { + "NbConvertApp": { + "from_stdin": True, + } + }, + "read a single notebook file from stdin. Write the resulting notebook with default basename 'notebook.*'", + ), + "stdout": ( + {"NbConvertApp": {"writer_class": "StdoutWriter"}}, + "Write notebook output to stdout instead of files.", + ), + "inplace": ( + { + "NbConvertApp": { + "use_output_suffix": False, + "export_format": "notebook", + }, + "FilesWriter": {"build_directory": ""}, + }, + """Run nbconvert in place, overwriting the existing notebook (only + relevant when converting to notebook format)""", + ), + "clear-output": ( + { + "NbConvertApp": { + "use_output_suffix": False, + "export_format": "notebook", + }, + "FilesWriter": {"build_directory": ""}, + "ClearOutputPreprocessor": {"enabled": True}, + }, + """Clear output of current file and save in place, + overwriting the existing notebook. """, + ), + "no-prompt": ( + { + "TemplateExporter": { + "exclude_input_prompt": True, + "exclude_output_prompt": True, + } }, - 'FilesWriter' : {'build_directory': ''}, - }, - """Run nbconvert in place, overwriting the existing notebook (only - relevant when converting to notebook format)""" - ), - 'clear-output' : ( - { - 'NbConvertApp' : { - 'use_output_suffix' : False, - 'export_format' : 'notebook', + "Exclude input and output prompts from converted document.", + ), + "no-input": ( + { + "TemplateExporter": { + "exclude_output_prompt": True, + "exclude_input": True, + "exclude_input_prompt": True, + } + }, + """Exclude input cells and output prompts from converted document. + This mode is ideal for generating code-free reports.""", + ), + "allow-chromium-download": ( + { + "WebPDFExporter": { + "allow_chromium_download": True, + } + }, + """Whether to allow downloading chromium if no suitable version is found on the system.""", + ), + "disable-chromium-sandbox": ( + { + "WebPDFExporter": { + "disable_sandbox": True, + } + }, + """Disable chromium security sandbox when converting to PDF..""", + ), + "show-input": ( + { + "TemplateExporter": { + "exclude_input": False, + } }, - 'FilesWriter' : {'build_directory': ''}, - 'ClearOutputPreprocessor' : {'enabled' : True}, - }, - """Clear output of current file and save in place, - overwriting the existing notebook. """ - ), - 'no-prompt' : ( - {'TemplateExporter' : { - 'exclude_input_prompt' : True, - 'exclude_output_prompt' : True, - } - }, - "Exclude input and output prompts from converted document." - ), - 'no-input' : ( - {'TemplateExporter' : { - 'exclude_output_prompt' : True, - 'exclude_input': True, - 'exclude_input_prompt': True, - } - }, - """Exclude input cells and output prompts from converted document. - This mode is ideal for generating code-free reports.""" - ), - 'allow-chromium-download' : ( - {'WebPDFExporter' : { - 'allow_chromium_download' : True, - } - }, - """Whether to allow downloading chromium if no suitable version is found on the system.""" - ), - 'disable-chromium-sandbox': ( - {'WebPDFExporter': { - 'disable_sandbox': True, - } - }, - """Disable chromium security sandbox when converting to PDF..""" - ), - 'show-input' : ( - {'TemplateExporter' : { - 'exclude_input': False, - } - }, - """Shows code input. This flag is only useful for dejavu users.""" - ), - 'embed-images' : ( - {'HTMLExporter' : { - 'embed_images': True, - } - }, - """Embed the images as base64 dataurls in the output. This flag is only useful for the HTML/WebPDF/Slides exports.""" + """Shows code input. This flag is only useful for dejavu users.""", ), -}) + "embed-images": ( + { + "HTMLExporter": { + "embed_images": True, + } + }, + """Embed the images as base64 dataurls in the output. This flag is only useful for the HTML/WebPDF/Slides exports.""", + ), + "sanitize-html": ( + { + "HTMLExporter": { + "sanitize_html": True, + } + }, + """Whether the HTML in Markdown cells and cell outputs should be sanitized..""", + ), + } +) class NbConvertApp(JupyterApp): """Application used to convert from notebook file type (``*.ipynb``)""" - + version = __version__ - name = 'jupyter-nbconvert' + name = "jupyter-nbconvert" aliases = nbconvert_aliases flags = nbconvert_flags - @default('log_level') + @default("log_level") def _log_level_default(self): return logging.INFO - + classes = List() - @default('classes') + + @default("classes") def _classes_default(self): classes = [NbConvertBase] for pkg in (exporters, preprocessors, writers, postprocessors): @@ -182,106 +213,125 @@ cls = getattr(pkg, name) if isinstance(cls, type) and issubclass(cls, Configurable): classes.append(cls) - + return classes description = Unicode( - u"""This application is used to convert notebook files (*.ipynb) + """This application is used to convert notebook files (*.ipynb) to various other formats. - WARNING: THE COMMANDLINE INTERFACE MAY CHANGE IN FUTURE RELEASES.""") + WARNING: THE COMMANDLINE INTERFACE MAY CHANGE IN FUTURE RELEASES.""" + ) - output_base = Unicode('', help='''overwrite base name use for output files. + output_base = Unicode( + "", + help="""overwrite base name use for output files. can only be used when converting one notebook at a time. - ''').tag(config=True) + """, + ).tag(config=True) use_output_suffix = Bool( - True, + True, help="""Whether to apply a suffix prior to the extension (only relevant when converting to notebook format). The suffix is determined by - the exporter, and is usually '.nbconvert'.""" + the exporter, and is usually '.nbconvert'.""", ).tag(config=True) - output_files_dir = Unicode('{notebook_name}_files', - help='''Directory to copy extra files (figures) to. + output_files_dir = Unicode( + "{notebook_name}_files", + help="""Directory to copy extra files (figures) to. '{notebook_name}' in the string will be converted to notebook - basename.''' + basename.""", ).tag(config=True) - examples = Unicode(u""" + examples = Unicode( + """ The simplest way to use nbconvert is - + > jupyter nbconvert mynotebook.ipynb --to html Options include {formats}. - + > jupyter nbconvert --to latex mynotebook.ipynb Both HTML and LaTeX support multiple output templates. LaTeX includes - 'base', 'article' and 'report'. HTML includes 'basic', 'lab' and + 'base', 'article' and 'report'. HTML includes 'basic', 'lab' and 'classic'. You can specify the flavor of the format used. > jupyter nbconvert --to html --template lab mynotebook.ipynb - + You can also pipe the output to stdout, rather than a file - + > jupyter nbconvert mynotebook.ipynb --stdout PDF is generated via latex > jupyter nbconvert mynotebook.ipynb --to pdf - + You can get (and serve) a Reveal.js-powered slideshow - + > jupyter nbconvert myslides.ipynb --to slides --post serve - - Multiple notebooks can be given at the command line in a couple of + + Multiple notebooks can be given at the command line in a couple of different ways: - + > jupyter nbconvert notebook*.ipynb > jupyter nbconvert notebook1.ipynb notebook2.ipynb - + or you can specify the notebooks list in a config file, containing:: - + c.NbConvertApp.notebooks = ["my_notebook.ipynb"] - + > jupyter nbconvert --config mycfg.py - """.format(formats=get_export_names())) + """.format( + formats=get_export_names() + ) + ) # Writer specific variables - writer = Instance('nbconvert.writers.base.WriterBase', - help="""Instance of the writer class used to write the - results of the conversion.""", allow_none=True) - writer_class = DottedObjectName('FilesWriter', - help="""Writer class used to write the - results of the conversion""").tag(config=True) - writer_aliases = {'fileswriter': 'nbconvert.writers.files.FilesWriter', - 'debugwriter': 'nbconvert.writers.debug.DebugWriter', - 'stdoutwriter': 'nbconvert.writers.stdout.StdoutWriter'} + writer = Instance( + "nbconvert.writers.base.WriterBase", + help="""Instance of the writer class used to write the + results of the conversion.""", + allow_none=True, + ) + writer_class = DottedObjectName( + "FilesWriter", + help="""Writer class used to write the + results of the conversion""", + ).tag(config=True) + writer_aliases = { + "fileswriter": "nbconvert.writers.files.FilesWriter", + "debugwriter": "nbconvert.writers.debug.DebugWriter", + "stdoutwriter": "nbconvert.writers.stdout.StdoutWriter", + } writer_factory = Type(allow_none=True) - - @observe('writer_class') + + @observe("writer_class") def _writer_class_changed(self, change): - new = change['new'] + new = change["new"] if new.lower() in self.writer_aliases: new = self.writer_aliases[new.lower()] self.writer_factory = import_item(new) # Post-processor specific variables - postprocessor = Instance('nbconvert.postprocessors.base.PostProcessorBase', - help="""Instance of the PostProcessor class used to write the - results of the conversion.""", allow_none=True) + postprocessor = Instance( + "nbconvert.postprocessors.base.PostProcessorBase", + help="""Instance of the PostProcessor class used to write the + results of the conversion.""", + allow_none=True, + ) postprocessor_class = DottedOrNone( - help="""PostProcessor class used to write the + help="""PostProcessor class used to write the results of the conversion""" ).tag(config=True) - postprocessor_aliases = {'serve': 'nbconvert.postprocessors.serve.ServePostProcessor'} + postprocessor_aliases = {"serve": "nbconvert.postprocessors.serve.ServePostProcessor"} postprocessor_factory = Type(None, allow_none=True) - - @observe('postprocessor_class') + + @observe("postprocessor_class") def _postprocessor_class_changed(self, change): - new = change['new'] + new = change["new"] if new.lower() in self.postprocessor_aliases: new = self.postprocessor_aliases[new.lower()] if new: @@ -292,13 +342,17 @@ help="""The export format to be used, either one of the built-in formats {formats} or a dotted object name that represents the import path for an - ``Exporter`` class""".format(formats=get_export_names()) + ``Exporter`` class""".format( + formats=get_export_names() + ), ).tag(config=True) - notebooks = List([], help="""List of notebooks to convert. + notebooks = List( + [], + help="""List of notebooks to convert. Wildcards are supported. Filenames passed positionally will be added to the list. - """ + """, ).tag(config=True) from_stdin = Bool(False, help="read a single notebook from stdin.").tag(config=True) @@ -306,7 +360,7 @@ def initialize(self, argv=None): """Initialize application, notebooks, writer, and postprocessor""" # See https://bugs.python.org/issue37373 :( - if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith('win'): + if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith("win"): asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) self.init_syspath() @@ -337,29 +391,29 @@ # Use glob to replace all the notebook patterns with filenames. filenames = [] for pattern in patterns: - - # Use glob to find matching filenames. Allow the user to convert + + # Use glob to find matching filenames. Allow the user to convert # notebooks without having to type the extension. globbed_files = glob.glob(pattern) - globbed_files.extend(glob.glob(pattern + '.ipynb')) + globbed_files.extend(glob.glob(pattern + ".ipynb")) if not globbed_files: self.log.warning("pattern %r matched no files", pattern) for filename in globbed_files: - if not filename in filenames: + if filename not in filenames: filenames.append(filename) self.notebooks = filenames def init_writer(self): """Initialize the writer (which is stateless)""" - self._writer_class_changed({ 'new': self.writer_class }) + self._writer_class_changed({"new": self.writer_class}) self.writer = self.writer_factory(parent=self) - if hasattr(self.writer, 'build_directory') and self.writer.build_directory != '': + if hasattr(self.writer, "build_directory") and self.writer.build_directory != "": self.use_output_suffix = False def init_postprocessor(self): """Initialize the postprocessor (which is stateless)""" - self._postprocessor_class_changed({'new': self.postprocessor_class}) + self._postprocessor_class_changed({"new": self.postprocessor_class}) if self.postprocessor_factory: self.postprocessor = self.postprocessor_factory(parent=self) @@ -383,10 +437,10 @@ including the notebook itself) should be saved """ basename = os.path.basename(notebook_filename) - notebook_name = basename[:basename.rfind('.')] + notebook_name = basename[: basename.rfind(".")] if self.output_base: # strip duplicate extension from output_base, to avoid Basename.ext.ext - if getattr(self.exporter, 'file_extension', False): + if getattr(self.exporter, "file_extension", False): base, ext = os.path.splitext(self.output_base) if ext == self.exporter.file_extension: self.output_base = base @@ -396,13 +450,12 @@ # first initialize the resources we want to use resources = {} - resources['config_dir'] = self.config_dir - resources['unique_key'] = notebook_name + resources["config_dir"] = self.config_dir + resources["unique_key"] = notebook_name - output_files_dir = (self.output_files_dir - .format(notebook_name=notebook_name)) + output_files_dir = self.output_files_dir.format(notebook_name=notebook_name) - resources['output_files_dir'] = output_files_dir + resources["output_files_dir"] = output_files_dir return resources @@ -432,7 +485,9 @@ if input_buffer is not None: output, resources = self.exporter.from_file(input_buffer, resources=resources) else: - output, resources = self.exporter.from_filename(notebook_filename, resources=resources) + output, resources = self.exporter.from_filename( + notebook_filename, resources=resources + ) except ConversionException: self.log.error("Error while converting '%s'", notebook_filename, exc_info=True) self.exit(1) @@ -457,15 +512,14 @@ file results from the specified writer output of exporter """ - if 'unique_key' not in resources: + if "unique_key" not in resources: raise KeyError("unique_key MUST be specified in the resources, but it is not") - notebook_name = resources['unique_key'] + notebook_name = resources["unique_key"] if self.use_output_suffix and not self.output_base: - notebook_name += resources.get('output_suffix', '') + notebook_name += resources.get("output_suffix", "") - write_results = self.writer.write( - output, resources, notebook_name=notebook_name) + write_results = self.writer.write(output, resources, notebook_name=notebook_name) return write_results def postprocess_single_notebook(self, write_results): @@ -476,7 +530,7 @@ the notebook. """ # Post-process if post processor has been defined. - if hasattr(self, 'postprocessor') and self.postprocessor: + if hasattr(self, "postprocessor") and self.postprocessor: self.postprocessor(write_results) def convert_single_notebook(self, notebook_filename, input_buffer=None): @@ -501,17 +555,19 @@ self.log.info("Converting notebook %s to %s", notebook_filename, self.export_format) else: self.log.info("Converting notebook into %s", self.export_format) - + resources = self.init_single_notebook_resources(notebook_filename) - output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer) + output, resources = self.export_single_notebook( + notebook_filename, resources, input_buffer=input_buffer + ) write_results = self.write_single_notebook(output, resources) self.postprocess_single_notebook(write_results) def convert_notebooks(self): - """Convert the notebooks in the self.notebook traitlet """ + """Convert the notebooks in the self.notebook traitlet""" # check that the output base isn't specified if there is more than # one notebook to convert - if self.output_base != '' and len(self.notebooks) > 1: + if self.output_base != "" and len(self.notebooks) > 1: self.log.error( """ UsageError: --output flag or `NbConvertApp.output_base` config option @@ -550,9 +606,9 @@ """ flags = "The following flags are defined:\n\n" for flag, (cfg, fhelp) in self.flags.items(): - flags += "{}\n".format(flag) - flags += indent(fill(fhelp, 80)) + '\n\n' - flags += indent(fill("Long Form: "+str(cfg), 80)) + '\n\n' + flags += f"{flag}\n" + flags += indent(fill(fhelp, 80)) + "\n\n" + flags += indent(fill("Long Form: " + str(cfg), 80)) + "\n\n" return flags def document_alias_help(self): @@ -560,7 +616,7 @@ aliases = "The folowing aliases are defined:\n\n" for alias, longname in self.aliases.items(): - aliases += "\t**{}** ({})\n\n".format(alias, longname) + aliases += f"\t**{alias}** ({longname})\n\n" return aliases def document_config_options(self): @@ -569,25 +625,29 @@ breaking the configuration options into app, exporter, writer, preprocessor, postprocessor, and other sections. """ - categories = {category: [c for c in self._classes_inc_parents() if category in c.__name__.lower()] - for category in ['app', 'exporter', 'writer', 'preprocessor', 'postprocessor']} + categories = { + category: [c for c in self._classes_inc_parents() if category in c.__name__.lower()] + for category in ["app", "exporter", "writer", "preprocessor", "postprocessor"] + } accounted_for = {c for category in categories.values() for c in category} - categories['other']= [c for c in self._classes_inc_parents() if c not in accounted_for] + categories["other"] = [c for c in self._classes_inc_parents() if c not in accounted_for] - header = dedent(""" + header = dedent( + """ {section} Options ----------------------- - """) + """ + ) sections = "" for category in categories: sections += header.format(section=category.title()) - if category in ['exporter','preprocessor','writer']: - sections += ".. image:: _static/{image}_inheritance.png\n\n".format(image=category) - sections += '\n'.join(c.class_config_rst_doc() for c in categories[category]) + if category in ["exporter", "preprocessor", "writer"]: + sections += f".. image:: _static/{category}_inheritance.png\n\n" + sections += "\n".join(c.class_config_rst_doc() for c in categories[category]) + + return sections.replace(" : ", r" \: ") - return sections.replace(' : ',r' \: ') - class DejavuApp(NbConvertApp): def initialize(self, argv=None): @@ -599,14 +659,14 @@ super().initialize(argv) - @default('export_format') + @default("export_format") def default_export_format(self): - return 'html' + return "html" -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Main entry point -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- main = launch_new_instance = NbConvertApp.launch_instance dejavu_main = DejavuApp.launch_instance diff -Nru nbconvert-6.4.4/nbconvert/postprocessors/base.py nbconvert-6.5.3/nbconvert/postprocessors/base.py --- nbconvert-6.4.4/nbconvert/postprocessors/base.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/postprocessors/base.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,35 +1,33 @@ """ Basic post processor """ -#----------------------------------------------------------------------------- -#Copyright (c) 2013, the IPython Development Team. +# ----------------------------------------------------------------------------- +# Copyright (c) 2013, the IPython Development Team. # -#Distributed under the terms of the Modified BSD License. +# Distributed under the terms of the Modified BSD License. # -#The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# The full license is in the file COPYING.txt, distributed with this software. +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- from ..utils.base import NbConvertBase -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Classes -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- class PostProcessorBase(NbConvertBase): - def __call__(self, input): """ See def postprocess() ... """ self.postprocess(input) - def postprocess(self, input): """ Post-process output from a writer. """ - raise NotImplementedError('postprocess') + raise NotImplementedError("postprocess") diff -Nru nbconvert-6.4.4/nbconvert/postprocessors/serve.py nbconvert-6.5.3/nbconvert/postprocessors/serve.py --- nbconvert-6.4.4/nbconvert/postprocessors/serve.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/postprocessors/serve.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,26 +3,26 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function import os -import webbrowser import threading +import webbrowser -from tornado import web, ioloop, httpserver, log, gen +from tornado import gen, httpserver, ioloop, log, web from tornado.httpclient import AsyncHTTPClient -from traitlets import Bool, Unicode, Int +from traitlets import Bool, Int, Unicode from .base import PostProcessorBase class ProxyHandler(web.RequestHandler): """handler the proxies requests from a local prefix to a CDN""" + @gen.coroutine def get(self, prefix, url): """proxy a request to a CDN""" - proxy_url = "/".join([self.settings['cdn'], url]) - client = self.settings['client'] + proxy_url = "/".join([self.settings["cdn"], url]) + client = self.settings["client"] response = yield client.fetch(proxy_url) for header in ["Content-Type", "Cache-Control", "Date", "Last-Modified", "Expires"]: @@ -33,42 +33,42 @@ class ServePostProcessor(PostProcessorBase): """Post processor designed to serve files - + Proxies reveal.js requests to a CDN if no local reveal.js is present """ - - open_in_browser = Bool(True, - help="""Should the browser be opened automatically?""" - ).tag(config=True) - - browser = Unicode(u'', - help="""Specify what browser should be used to open slides. See + open_in_browser = Bool(True, help="""Should the browser be opened automatically?""").tag( + config=True + ) + + browser = Unicode( + "", + help="""Specify what browser should be used to open slides. See https://docs.python.org/3/library/webbrowser.html#webbrowser.register - to see how keys are mapped to browser executables. If - not specified, the default browser will be determined - by the `webbrowser` - standard library module, which allows setting of the BROWSER + to see how keys are mapped to browser executables. If + not specified, the default browser will be determined + by the `webbrowser` + standard library module, which allows setting of the BROWSER environment variable to override it. - """).tag(config=True) + """, + ).tag(config=True) - reveal_cdn = Unicode("https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.5.0", - help="""URL for reveal.js CDN.""").tag(config=True) - reveal_prefix = Unicode("reveal.js", - help="URL prefix for reveal.js").tag(config=True) - ip = Unicode("127.0.0.1", - help="The IP address to listen on.").tag(config=True) + reveal_cdn = Unicode( + "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.5.0", help="""URL for reveal.js CDN.""" + ).tag(config=True) + reveal_prefix = Unicode("reveal.js", help="URL prefix for reveal.js").tag(config=True) + ip = Unicode("127.0.0.1", help="The IP address to listen on.").tag(config=True) port = Int(8000, help="port for the server to listen on.").tag(config=True) def postprocess(self, input): """Serve the build directory with a webserver.""" dirname, filename = os.path.split(input) handlers = [ - (r"/(.+)", web.StaticFileHandler, {'path' : dirname}), - (r"/", web.RedirectHandler, {"url": "/%s" % filename}) + (r"/(.+)", web.StaticFileHandler, {"path": dirname}), + (r"/", web.RedirectHandler, {"url": "/%s" % filename}), ] - - if ('://' in self.reveal_prefix or self.reveal_prefix.startswith("//")): + + if "://" in self.reveal_prefix or self.reveal_prefix.startswith("//"): # reveal specifically from CDN, nothing to do pass elif os.path.isdir(os.path.join(dirname, self.reveal_prefix)): @@ -77,12 +77,13 @@ else: self.log.info("Redirecting %s requests to %s", self.reveal_prefix, self.reveal_cdn) handlers.insert(0, (r"/(%s)/(.*)" % self.reveal_prefix, ProxyHandler)) - - app = web.Application(handlers, - cdn=self.reveal_cdn, - client=AsyncHTTPClient(), - ) - + + app = web.Application( + handlers, + cdn=self.reveal_cdn, + client=AsyncHTTPClient(), + ) + # hook up tornado logging to our logger log.app_log = self.log @@ -94,10 +95,10 @@ if self.open_in_browser: try: browser = webbrowser.get(self.browser or None) - b = lambda: browser.open(url, new=2) + b = lambda: browser.open(url, new=2) # noqa threading.Thread(target=b).start() except webbrowser.Error as e: - self.log.warning('No web browser found: %s.' % e) + self.log.warning("No web browser found: %s." % e) browser = None try: @@ -105,11 +106,14 @@ except KeyboardInterrupt: print("\nInterrupted") + def main(path): """allow running this module to serve the slides""" server = ServePostProcessor() server(path) - -if __name__ == '__main__': + + +if __name__ == "__main__": import sys + main(sys.argv[1]) diff -Nru nbconvert-6.4.4/nbconvert/postprocessors/tests/test_serve.py nbconvert-6.5.3/nbconvert/postprocessors/tests/test_serve.py --- nbconvert-6.4.4/nbconvert/postprocessors/tests/test_serve.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/postprocessors/tests/test_serve.py 2022-08-11 11:50:51.000000000 +0000 @@ -6,6 +6,7 @@ # Distributed under the terms of the Modified BSD License. import pytest + from ...tests.base import TestsBase @@ -18,7 +19,6 @@ try: from ..serve import ServePostProcessor except ImportError: - print("Something weird is happening.\n" - "Tornado is sometimes present, sometimes not.") + print("Something weird is happening.\nTornado is sometimes present, sometimes not.") raise ServePostProcessor() diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/base.py nbconvert-6.5.3/nbconvert/preprocessors/base.py --- nbconvert-6.4.4/nbconvert/preprocessors/base.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/base.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,12 +3,13 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from ..utils.base import NbConvertBase from traitlets import Bool +from ..utils.base import NbConvertBase + class Preprocessor(NbConvertBase): - """ A configurable preprocessor + """A configurable preprocessor Inherit from this class if you wish to have configurability for your preprocessor. @@ -23,7 +24,7 @@ Disabled by default and can be enabled via the config by 'c.YourPreprocessorName.enabled = True' """ - + enabled = Bool(False).tag(config=True) def __init__(self, **kw): @@ -37,13 +38,12 @@ `**kw` Additional keyword arguments passed to parent """ - + super().__init__(**kw) def __call__(self, nb, resources): if self.enabled: - self.log.debug("Applying preprocessor: %s", - self.__class__.__name__) + self.log.debug("Applying preprocessor: %s", self.__class__.__name__) return self.preprocess(nb, resources) else: return nb, resources @@ -85,6 +85,5 @@ Index of the cell being processed """ - raise NotImplementedError('should be implemented by subclass') + raise NotImplementedError("should be implemented by subclass") return cell, resources - diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/clearmetadata.py nbconvert-6.5.3/nbconvert/preprocessors/clearmetadata.py --- nbconvert-6.4.4/nbconvert/preprocessors/clearmetadata.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/clearmetadata.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,27 +4,38 @@ # Distributed under the terms of the Modified BSD License. from traitlets import Bool, Set + from .base import Preprocessor + class ClearMetadataPreprocessor(Preprocessor): """ Removes all the metadata from all code cells in a notebook. """ - clear_cell_metadata = Bool(True, - help=("Flag to choose if cell metadata is to be cleared " - "in addition to notebook metadata.")).tag(config=True) - clear_notebook_metadata = Bool(True, - help=("Flag to choose if notebook metadata is to be cleared " - "in addition to cell metadata.")).tag(config=True) - preserve_nb_metadata_mask = Set([('language_info', 'name')], - help=("Indicates the key paths to preserve when deleting metadata " - "across both cells and notebook metadata fields. Tuples of " - "keys can be passed to preserved specific nested values")).tag(config=True) + clear_cell_metadata = Bool( + True, + help=("Flag to choose if cell metadata is to be cleared in addition to notebook metadata."), + ).tag(config=True) + clear_notebook_metadata = Bool( + True, + help=("Flag to choose if notebook metadata is to be cleared in addition to cell metadata."), + ).tag(config=True) + preserve_nb_metadata_mask = Set( + [("language_info", "name")], + help=( + "Indicates the key paths to preserve when deleting metadata " + "across both cells and notebook metadata fields. Tuples of " + "keys can be passed to preserved specific nested values" + ), + ).tag(config=True) preserve_cell_metadata_mask = Set( - help=("Indicates the key paths to preserve when deleting metadata " - "across both cells and notebook metadata fields. Tuples of " - "keys can be passed to preserved specific nested values")).tag(config=True) + help=( + "Indicates the key paths to preserve when deleting metadata " + "across both cells and notebook metadata fields. Tuples of " + "keys can be passed to preserved specific nested values" + ) + ).tag(config=True) def current_key(self, mask_key): if isinstance(mask_key, str): @@ -36,10 +47,14 @@ return mask_key[0] def current_mask(self, mask): - return { self.current_key(k) for k in mask if self.current_key(k) is not None } + return {self.current_key(k) for k in mask if self.current_key(k) is not None} def nested_masks(self, mask): - return { self.current_key(k[0]): k[1:] for k in mask if k and not isinstance(k, str) and len(k) > 1 } + return { + self.current_key(k[0]): k[1:] + for k in mask + if k and not isinstance(k, str) and len(k) > 1 + } def nested_filter(self, items, mask): keep_current = self.current_mask(mask) @@ -58,18 +73,20 @@ All the code cells are returned with an empty metadata field. """ if self.clear_cell_metadata: - if cell.cell_type == 'code': + if cell.cell_type == "code": # Remove metadata - if 'metadata' in cell: - cell.metadata = dict(self.nested_filter(cell.metadata.items(), self.preserve_cell_metadata_mask)) + if "metadata" in cell: + cell.metadata = dict( + self.nested_filter(cell.metadata.items(), self.preserve_cell_metadata_mask) + ) return cell, resources def preprocess(self, nb, resources): """ Preprocessing to apply on each notebook. - + Must return modified nb, resources. - + Parameters ---------- nb : NotebookNode @@ -80,6 +97,8 @@ """ nb, resources = super().preprocess(nb, resources) if self.clear_notebook_metadata: - if 'metadata' in nb: - nb.metadata = dict(self.nested_filter(nb.metadata.items(), self.preserve_nb_metadata_mask)) + if "metadata" in nb: + nb.metadata = dict( + self.nested_filter(nb.metadata.items(), self.preserve_nb_metadata_mask) + ) return nb, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/clearoutput.py nbconvert-6.5.3/nbconvert/preprocessors/clearoutput.py --- nbconvert-6.4.4/nbconvert/preprocessors/clearoutput.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/clearoutput.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,6 +4,7 @@ # Distributed under the terms of the Modified BSD License. from traitlets import Set + from .base import Preprocessor @@ -12,19 +13,17 @@ Removes the output from all code cells in a notebook. """ - remove_metadata_fields = Set( - {'collapsed', 'scrolled'} - ).tag(config=True) + remove_metadata_fields = Set({"collapsed", "scrolled"}).tag(config=True) def preprocess_cell(self, cell, resources, cell_index): """ Apply a transformation on each cell. See base.py for details. """ - if cell.cell_type == 'code': + if cell.cell_type == "code": cell.outputs = [] cell.execution_count = None # Remove metadata associated with output - if 'metadata' in cell: + if "metadata" in cell: for field in self.remove_metadata_fields: cell.metadata.pop(field, None) return cell, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/coalescestreams.py nbconvert-6.5.3/nbconvert/preprocessors/coalescestreams.py --- nbconvert-6.4.4/nbconvert/preprocessors/coalescestreams.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/coalescestreams.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,10 +3,12 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -import re import functools +import re + from traitlets.log import get_logger + def cell_preprocessor(function): """ Wrap a function to be executed on all cells of a notebook @@ -21,17 +23,19 @@ index : int Index of the cell being processed """ + @functools.wraps(function) def wrappedfunc(nb, resources): - get_logger().debug( - "Applying preprocessor: %s", function.__name__ - ) + get_logger().debug("Applying preprocessor: %s", function.__name__) for index, cell in enumerate(nb.cells): nb.cells[index], resources = function(cell, resources, index) return nb, resources + return wrappedfunc -cr_pat = re.compile(r'.*\r(?=[^\n])') + +cr_pat = re.compile(r".*\r(?=[^\n])") + @cell_preprocessor def coalesce_streams(cell, resources, index): @@ -49,28 +53,29 @@ index : int Index of the cell being processed """ - - outputs = cell.get('outputs', []) + + outputs = cell.get("outputs", []) if not outputs: return cell, resources - + last = outputs[0] new_outputs = [last] for output in outputs[1:]: - if (output.output_type == 'stream' and - last.output_type == 'stream' and - last.name == output.name + if ( + output.output_type == "stream" + and last.output_type == "stream" + and last.name == output.name ): last.text += output.text else: new_outputs.append(output) last = output - + # process \r characters for output in new_outputs: - if output.output_type == 'stream' and '\r' in output.text: - output.text = cr_pat.sub('', output.text) + if output.output_type == "stream" and "\r" in output.text: + output.text = cr_pat.sub("", output.text) cell.outputs = new_outputs return cell, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/convertfigures.py nbconvert-6.5.3/nbconvert/preprocessors/convertfigures.py --- nbconvert-6.4.4/nbconvert/preprocessors/convertfigures.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/convertfigures.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,4 +1,4 @@ -"""Module containing a preprocessor that converts outputs in the notebook from +"""Module containing a preprocessor that converts outputs in the notebook from one format to another. """ @@ -6,17 +6,18 @@ # Distributed under the terms of the Modified BSD License. -from .base import Preprocessor from traitlets import Unicode +from .base import Preprocessor + class ConvertFiguresPreprocessor(Preprocessor): """ Converts all of the outputs in a notebook from one format to another. """ - from_format = Unicode(help='Format the converter accepts').tag(config=True) - to_format = Unicode(help='Format the converter writes').tag(config=True) + from_format = Unicode(help="Format the converter accepts").tag(config=True) + to_format = Unicode(help="Format the converter writes").tag(config=True) def __init__(self, **kw): """ @@ -24,11 +25,9 @@ """ super().__init__(**kw) - def convert_figure(self, data_format, data): raise NotImplementedError() - def preprocess_cell(self, cell, resources, cell_index): """ Apply a transformation on each cell, @@ -37,12 +36,15 @@ """ # Loop through all of the datatypes of the outputs in the cell. - for output in cell.get('outputs', []): - if output.output_type in {'execute_result', 'display_data'} \ - and self.from_format in output.data \ - and self.to_format not in output.data: + for output in cell.get("outputs", []): + if ( + output.output_type in {"execute_result", "display_data"} + and self.from_format in output.data + and self.to_format not in output.data + ): output.data[self.to_format] = self.convert_figure( - self.from_format, output.data[self.from_format]) + self.from_format, output.data[self.from_format] + ) return cell, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/csshtmlheader.py nbconvert-6.5.3/nbconvert/preprocessors/csshtmlheader.py --- nbconvert-6.4.4/nbconvert/preprocessors/csshtmlheader.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/csshtmlheader.py 2022-08-11 11:50:51.000000000 +0000 @@ -4,14 +4,12 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -import os -import io import hashlib -import nbconvert.resources +import os -from traitlets import Unicode, Union, Type -from pygments.style import Style from jupyterlab_pygments import JupyterStyle +from pygments.style import Style +from traitlets import Type, Unicode, Union from .base import Preprocessor @@ -26,13 +24,13 @@ Preprocessor used to pre-process notebook for HTML output. Adds IPython notebook front-end CSS and Pygments CSS to HTML output. """ - highlight_class = Unicode('.highlight', - help="CSS highlight class identifier" - ).tag(config=True) - style = Union([Unicode('default'), Type(klass=Style)], - help='Name of the pygments style to use', - default_value=JupyterStyle + highlight_class = Unicode(".highlight", help="CSS highlight class identifier").tag(config=True) + + style = Union( + [Unicode("default"), Type(klass=Style)], + help="Name of the pygments style to use", + default_value=JupyterStyle, ).tag(config=True) def __init__(self, *pargs, **kwargs): @@ -54,8 +52,8 @@ Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine. """ - resources['inlining'] = {} - resources['inlining']['css'] = self._generate_header(resources) + resources["inlining"] = {} + resources["inlining"]["css"] = self._generate_header(resources) return nb, resources def _generate_header(self, resources): @@ -64,6 +62,7 @@ and Pygments. """ from pygments.formatters import HtmlFormatter + header = [] formatter = HtmlFormatter(style=self.style) @@ -73,19 +72,21 @@ # Load the user's custom CSS and IPython's default custom CSS. If they # differ, assume the user has made modifications to his/her custom CSS # and that we should inline it in the nbconvert output. - config_dir = resources['config_dir'] - custom_css_filename = os.path.join(config_dir, 'custom', 'custom.css') + config_dir = resources["config_dir"] + custom_css_filename = os.path.join(config_dir, "custom", "custom.css") if os.path.isfile(custom_css_filename): if DEFAULT_STATIC_FILES_PATH and self._default_css_hash is None: - self._default_css_hash = self._hash(os.path.join(DEFAULT_STATIC_FILES_PATH, 'custom', 'custom.css')) + self._default_css_hash = self._hash( + os.path.join(DEFAULT_STATIC_FILES_PATH, "custom", "custom.css") + ) if self._hash(custom_css_filename) != self._default_css_hash: - with io.open(custom_css_filename, encoding='utf-8') as f: + with open(custom_css_filename, encoding="utf-8") as f: header.append(f.read()) return header def _hash(self, filename): """Compute the hash of a file.""" md5 = hashlib.md5() - with open(filename, 'rb') as f: + with open(filename, "rb") as f: md5.update(f.read()) return md5.digest() diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/execute.py nbconvert-6.5.3/nbconvert/preprocessors/execute.py --- nbconvert-6.4.4/nbconvert/preprocessors/execute.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/execute.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,22 +1,27 @@ """Module containing a preprocessor that executes the code cells and updates outputs""" +from nbclient import NotebookClient +from nbclient import execute as _execute + +# Backwards compatability for imported name +from nbclient.exceptions import CellExecutionError # noqa + # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from typing import Optional from nbformat import NotebookNode -from nbclient import NotebookClient, execute as _execute -# Backwards compatability for imported name -from nbclient.exceptions import CellExecutionError from .base import Preprocessor def executenb(*args, **kwargs): from warnings import warn - warn("The 'nbconvert.preprocessors.execute.executenb' function was moved to nbclient.execute. " + + warn( + "The 'nbconvert.preprocessors.execute.executenb' function was moved to nbclient.execute. " "We recommend importing that library directly.", - FutureWarning) + FutureWarning, + ) return _execute(*args, **kwargs) @@ -29,15 +34,15 @@ """ def __init__(self, **kw): - nb = kw.get('nb') + nb = kw.get("nb") Preprocessor.__init__(self, nb=nb, **kw) NotebookClient.__init__(self, nb, **kw) def _check_assign_resources(self, resources): - if resources or not hasattr(self, 'resources'): + if resources or not hasattr(self, "resources"): self.resources = resources - def preprocess(self, nb, resources=None, km=None): + def preprocess(self, nb: NotebookNode, resources=None, km=None): """ Preprocess notebook executing each code cell. @@ -45,7 +50,7 @@ Note that this function recalls NotebookClient.__init__, which may look wrong. However since the preprocess call acts line an init on execution state it's expected. - Therefore, we need to capture it here again to properly reset because traitlet + Therefore, we need to capture it here again to properly reset because traitlet assignments are not passed. There is a risk if traitlets apply any side effects for dual init. The risk should be manageable, and this approach minimizes side-effects relative @@ -79,7 +84,7 @@ with self.setup_kernel(): info_msg = self.wait_for_reply(self.kc.kernel_info()) - self.nb.metadata['language_info'] = info_msg['content']['language_info'] + self.nb.metadata["language_info"] = info_msg["content"]["language_info"] for index, cell in enumerate(self.nb.cells): self.preprocess_cell(cell, resources, index) self.set_widgets_metadata() diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/extractoutput.py nbconvert-6.5.3/nbconvert/preprocessors/extractoutput.py --- nbconvert-6.4.4/nbconvert/preprocessors/extractoutput.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/extractoutput.py 2022-08-11 11:50:51.000000000 +0000 @@ -5,20 +5,16 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -from textwrap import dedent -from binascii import a2b_base64 -import sys -import os import json +import os +import sys +from binascii import a2b_base64 from mimetypes import guess_extension +from textwrap import dedent -from traitlets import Unicode, Set -from .base import Preprocessor +from traitlets import Set, Unicode -if sys.version_info < (3,): - text_type = basestring -else: - text_type = str +from .base import Preprocessor def guess_extension_without_jpe(mimetype): @@ -29,30 +25,32 @@ as mimetypes.guess_extension """ ext = guess_extension(mimetype) - if ext==".jpe": - ext=".jpeg" + if ext == ".jpe": + ext = ".jpeg" return ext + def platform_utf_8_encode(data): - if isinstance(data, text_type): - if sys.platform == 'win32': - data = data.replace('\n', '\r\n') - data = data.encode('utf-8') + if isinstance(data, str): + if sys.platform == "win32": + data = data.replace("\n", "\r\n") + data = data.encode("utf-8") return data + class ExtractOutputPreprocessor(Preprocessor): """ Extracts all of the outputs from the notebook file. The extracted outputs are returned in the 'resources' dictionary. """ - output_filename_template = Unicode( - "{unique_key}_{cell_index}_{index}{extension}" - ).tag(config=True) - - extract_output_types = Set( - {'image/png', 'image/jpeg', 'image/svg+xml', 'application/pdf'} - ).tag(config=True) + output_filename_template = Unicode("{unique_key}_{cell_index}_{index}{extension}").tag( + config=True + ) + + extract_output_types = Set({"image/png", "image/jpeg", "image/svg+xml", "application/pdf"}).tag( + config=True + ) def preprocess_cell(self, cell, resources, cell_index): """ @@ -69,43 +67,43 @@ Index of the cell being processed (see base.py) """ - #Get the unique key from the resource dict if it exists. If it does not - #exist, use 'output' as the default. Also, get files directory if it - #has been specified - unique_key = resources.get('unique_key', 'output') - output_files_dir = resources.get('output_files_dir', None) - - #Make sure outputs key exists - if not isinstance(resources['outputs'], dict): - resources['outputs'] = {} - - #Loop through all of the outputs in the cell - for index, out in enumerate(cell.get('outputs', [])): - if out.output_type not in {'display_data', 'execute_result'}: + # Get the unique key from the resource dict if it exists. If it does not + # exist, use 'output' as the default. Also, get files directory if it + # has been specified + unique_key = resources.get("unique_key", "output") + output_files_dir = resources.get("output_files_dir", None) + + # Make sure outputs key exists + if not isinstance(resources["outputs"], dict): + resources["outputs"] = {} + + # Loop through all of the outputs in the cell + for index, out in enumerate(cell.get("outputs", [])): + if out.output_type not in {"display_data", "execute_result"}: continue - if 'text/html' in out.data: - out['data']['text/html'] = dedent(out['data']['text/html']) - #Get the output in data formats that the template needs extracted + if "text/html" in out.data: + out["data"]["text/html"] = dedent(out["data"]["text/html"]) + # Get the output in data formats that the template needs extracted for mime_type in self.extract_output_types: if mime_type in out.data: data = out.data[mime_type] # Binary files are base64-encoded, SVG is already XML - if mime_type in {'image/png', 'image/jpeg', 'application/pdf'}: + if mime_type in {"image/png", "image/jpeg", "application/pdf"}: # data is b64-encoded as text (str, unicode), # we want the original bytes data = a2b_base64(data) - elif mime_type == 'application/json' or not isinstance(data, text_type): + elif mime_type == "application/json" or not isinstance(data, str): # Data is either JSON-like and was parsed into a Python # object according to the spec, or data is for sure # JSON. In the latter case we want to go extra sure that # we enclose a scalar string value into extra quotes by # serializing it properly. - if isinstance(data, bytes) and not isinstance(data, text_type): - # In python 3 we need to guess the encoding in this + if isinstance(data, bytes): + # We need to guess the encoding in this # instance. Some modules that return raw data like # svg can leave the data in byte form instead of str - data = data.decode('utf-8') + data = data.decode("utf-8") data = platform_utf_8_encode(json.dumps(data)) else: # All other text_type data will fall into this path @@ -113,17 +111,15 @@ ext = guess_extension_without_jpe(mime_type) if ext is None: - ext = '.' + mime_type.rsplit('/')[-1] - if out.metadata.get('filename', ''): - filename = out.metadata['filename'] + ext = "." + mime_type.rsplit("/")[-1] + if out.metadata.get("filename", ""): + filename = out.metadata["filename"] if not filename.endswith(ext): - filename+=ext + filename += ext else: filename = self.output_filename_template.format( - unique_key=unique_key, - cell_index=cell_index, - index=index, - extension=ext) + unique_key=unique_key, cell_index=cell_index, index=index, extension=ext + ) # On the cell, make the figure available via # cell.outputs[i].metadata.filenames['mime/type'] @@ -131,10 +127,10 @@ # cell.outputs[i].data['mime/type'] contains the data if output_files_dir is not None: filename = os.path.join(output_files_dir, filename) - out.metadata.setdefault('filenames', {}) - out.metadata['filenames'][mime_type] = filename + out.metadata.setdefault("filenames", {}) + out.metadata["filenames"][mime_type] = filename - if filename in resources['outputs']: + if filename in resources["outputs"]: raise ValueError( "Your outputs have filename metadata associated " "with them. Nbconvert saves these outputs to " @@ -144,9 +140,9 @@ "associated with more than one output. The second " "output associated with this filename is in cell " "{}.".format(filename, cell_index) - ) - #In the resources, make the figure available via + ) + # In the resources, make the figure available via # resources['outputs']['filename'] = data - resources['outputs'][filename] = data + resources["outputs"][filename] = data return cell, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/highlightmagics.py nbconvert-6.5.3/nbconvert/preprocessors/highlightmagics.py --- nbconvert-6.4.4/nbconvert/preprocessors/highlightmagics.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/highlightmagics.py 2022-08-11 11:50:51.000000000 +0000 @@ -7,13 +7,13 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -from __future__ import print_function, absolute_import import re -from .base import Preprocessor from traitlets import Dict +from .base import Preprocessor + class HighlightMagicsPreprocessor(Preprocessor): """ @@ -21,25 +21,29 @@ """ # list of magic language extensions and their associated pygment lexers - default_languages = Dict({ - '%%R': 'r', - '%%bash': 'bash', - '%%cython': 'cython', - '%%javascript': 'javascript', - '%%julia': 'julia', - '%%latex': 'latex', - '%%octave': 'octave', - '%%perl': 'perl', - '%%ruby': 'ruby', - '%%sh': 'sh', - '%%sql': 'sql', - }) + default_languages = Dict( + { + "%%R": "r", + "%%bash": "bash", + "%%cython": "cython", + "%%javascript": "javascript", + "%%julia": "julia", + "%%latex": "latex", + "%%octave": "octave", + "%%perl": "perl", + "%%ruby": "ruby", + "%%sh": "sh", + "%%sql": "sql", + } + ) # user defined language extensions languages = Dict( - help=("Syntax highlighting for magic's extension languages. " - "Each item associates a language magic extension such as %%R, " - "with a pygments lexer such as r.") + help=( + "Syntax highlighting for magic's extension languages. " + "Each item associates a language magic extension such as %%R, " + "with a pygments lexer such as r." + ) ).tag(config=True) def __init__(self, config=None, **kw): @@ -53,8 +57,7 @@ # build a regular expression to catch language extensions and choose # an adequate pygments lexer any_language = "|".join(self.default_languages.keys()) - self.re_magic_language = re.compile( - r'^\s*({0})\s+'.format(any_language)) + self.re_magic_language = re.compile(rf"^\s*({any_language})\s+") def which_magic_language(self, source): """ @@ -96,5 +99,5 @@ if cell.cell_type == "code": magic_language = self.which_magic_language(cell.source) if magic_language: - cell['metadata']['magics_language'] = magic_language + cell["metadata"]["magics_language"] = magic_language return cell, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/__init__.py nbconvert-6.5.3/nbconvert/preprocessors/__init__.py --- nbconvert-6.4.4/nbconvert/preprocessors/__init__.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/__init__.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,19 +1,19 @@ # Class base Preprocessors +# Backwards compatability for imported name +from nbclient.exceptions import CellExecutionError + from .base import Preprocessor +from .clearmetadata import ClearMetadataPreprocessor +from .clearoutput import ClearOutputPreprocessor + +# decorated function Preprocessors +from .coalescestreams import coalesce_streams from .convertfigures import ConvertFiguresPreprocessor -from .svg2pdf import SVG2PDFPreprocessor -from .extractoutput import ExtractOutputPreprocessor -from .latex import LatexPreprocessor from .csshtmlheader import CSSHTMLHeaderPreprocessor -from .highlightmagics import HighlightMagicsPreprocessor -from .clearoutput import ClearOutputPreprocessor from .execute import ExecutePreprocessor +from .extractoutput import ExtractOutputPreprocessor +from .highlightmagics import HighlightMagicsPreprocessor +from .latex import LatexPreprocessor from .regexremove import RegexRemovePreprocessor +from .svg2pdf import SVG2PDFPreprocessor from .tagremove import TagRemovePreprocessor -from .clearmetadata import ClearMetadataPreprocessor - -# decorated function Preprocessors -from .coalescestreams import coalesce_streams - -# Backwards compatability for imported name -from nbclient.exceptions import CellExecutionError diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/latex.py nbconvert-6.5.3/nbconvert/preprocessors/latex.py --- nbconvert-6.4.4/nbconvert/preprocessors/latex.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/latex.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,37 +1,36 @@ """Module that allows latex output notebooks to be conditioned before they are converted. """ -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Imports -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- -from __future__ import print_function, absolute_import -from .base import Preprocessor from traitlets import Unicode -#----------------------------------------------------------------------------- +from .base import Preprocessor + +# ----------------------------------------------------------------------------- # Classes -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + class LatexPreprocessor(Preprocessor): """Preprocessor for latex destined documents. - + Mainly populates the ``latex`` key in the resources dict, adding definitions for pygments highlight styles. """ - style = Unicode('default', - help='Name of the pygments style to use' - ).tag(config=True) + style = Unicode("default", help="Name of the pygments style to use").tag(config=True) def preprocess(self, nb, resources): """Preprocessing to apply on each notebook. @@ -46,8 +45,10 @@ """ # Generate Pygments definitions for Latex from pygments.formatters import LatexFormatter - + resources.setdefault("latex", {}) - resources["latex"].setdefault("pygments_definitions", LatexFormatter(style=self.style).get_style_defs()) + resources["latex"].setdefault( + "pygments_definitions", LatexFormatter(style=self.style).get_style_defs() + ) resources["latex"].setdefault("pygments_style_name", self.style) return nb, resources diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/regexremove.py nbconvert-6.5.3/nbconvert/preprocessors/regexremove.py --- nbconvert-6.4.4/nbconvert/preprocessors/regexremove.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/regexremove.py 2022-08-11 11:50:51.000000000 +0000 @@ -7,7 +7,9 @@ # Distributed under the terms of the Modified BSD License. import re + from traitlets import List, Unicode + from .base import Preprocessor @@ -49,8 +51,7 @@ # Compile all the patterns into one: each pattern is first wrapped # by a non-capturing group to ensure the correct order of precedence # and the patterns are joined with a logical or - pattern = re.compile('|'.join('(?:%s)' % pattern - for pattern in self.patterns)) + pattern = re.compile("|".join("(?:%s)" % pattern for pattern in self.patterns)) # Filter out cells that meet the pattern and have no outputs return not pattern.match(cell.source) diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/sanitize.py nbconvert-6.5.3/nbconvert/preprocessors/sanitize.py --- nbconvert-6.4.4/nbconvert/preprocessors/sanitize.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/sanitize.py 2022-08-11 11:50:51.000000000 +0000 @@ -2,21 +2,46 @@ NBConvert Preprocessor for sanitizing HTML rendering of notebooks. """ -from bleach import ( - ALLOWED_ATTRIBUTES, - ALLOWED_STYLES, - ALLOWED_TAGS, - clean, -) -from traitlets import ( - Any, - Bool, - List, - Set, - Unicode, -) +import warnings + +from bleach import ALLOWED_ATTRIBUTES, ALLOWED_TAGS, clean +from traitlets import Any, Bool, List, Set, Unicode + +_USE_BLEACH_CSS_SANITIZER = False +_USE_BLEACH_STYLES = False + + +try: + # bleach[css] >=5.0 + from bleach.css_sanitizer import ALLOWED_CSS_PROPERTIES as ALLOWED_STYLES + from bleach.css_sanitizer import CSSSanitizer + + _USE_BLEACH_CSS_SANITIZER = True + _USE_BLEACH_STYLES = False +except ImportError: + try: + # bleach <5 + from bleach import ALLOWED_STYLES + + _USE_BLEACH_CSS_SANITIZER = False + _USE_BLEACH_STYLES = True + warnings.warn( + "Support for bleach <5 will be removed in a future version of nbconvert", + DeprecationWarning, + ) + + except ImportError: + warnings.warn( + "The installed bleach/tinycss2 do not provide CSS sanitization, " + "please upgrade to bleach >=5", + UserWarning, + ) + + from .base import Preprocessor +__all__ = ["SanitizeHTML"] + class SanitizeHTML(Preprocessor): @@ -36,12 +61,12 @@ Unicode(), config=True, default_value=ALLOWED_STYLES, - help="Allowed CSS styles if ' - }), - nbformat.new_output('stream', name='stdout', text="wat"), - nbformat.new_output('stream', name='stdout', text="") + nbformat.new_output( + "display_data", + data={ + "text/plain": "b", + "text/html": "", + "text/css": "", + }, + ), + nbformat.new_output("stream", name="stdout", text="wat"), + nbformat.new_output("stream", name="stdout", text=""), ] nb.cells[0].outputs = outputs @@ -174,35 +161,22 @@ expected_output = [ { - 'data': { - 'text/html': '<script>more evil</script>', - 'text/plain': 'b' - }, - 'metadata': {}, - 'output_type': 'display_data', - }, - { - 'name': 'stdout', - 'output_type': 'stream', - 'text': 'wat' + "data": {"text/html": "<script>more evil</script>", "text/plain": "b"}, + "metadata": {}, + "output_type": "display_data", }, - { - 'name': 'stdout', - 'output_type': - 'stream', 'text': '' - } + {"name": "stdout", "output_type": "stream", "text": "wat"}, + {"name": "stdout", "output_type": "stream", "text": ""}, ] self.assertEqual(nb.cells[0].outputs, expected_output) - def test_tag_whitelist(self): - """Test tag whitelisting""" + def test_tag_allowlist(self): + """Test tag allowlisting""" preprocessor = self.build_preprocessor() self.assertEqual( self.preprocess_source( - 'markdown', - '_A_ few ', - preprocessor + "markdown", "_A_ few ", preprocessor ), - '_A_ few <script>tags</script>' + "_A_ few <script>tags</script>", ) diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/tests/test_svg2pdf.py nbconvert-6.5.3/nbconvert/preprocessors/tests/test_svg2pdf.py --- nbconvert-6.4.4/nbconvert/preprocessors/tests/test_svg2pdf.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/tests/test_svg2pdf.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,12 +3,13 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. +from unittest.mock import patch + from nbformat import v4 as nbformat -from unittest.mock import patch, Mock -from .base import PreprocessorTestsBase -from ..svg2pdf import SVG2PDFPreprocessor from ...tests.utils import onlyif_cmds_exist +from ..svg2pdf import SVG2PDFPreprocessor +from .base import PreprocessorTestsBase class Testsvg2pdf(PreprocessorTestsBase): @@ -43,62 +44,57 @@ """Build a reveal slides notebook in memory for use with tests. Overrides base in PreprocessorTestsBase""" - outputs = [nbformat.new_output(output_type='display_data', - data={'image/svg+xml':self.simple_svg}) - ] + outputs = [ + nbformat.new_output(output_type="display_data", data={"image/svg+xml": self.simple_svg}) + ] - cells=[nbformat.new_code_cell(source="", execution_count=1, outputs=outputs)] + cells = [nbformat.new_code_cell(source="", execution_count=1, outputs=outputs)] return nbformat.new_notebook(cells=cells) - def build_preprocessor(self, **kwargs): """Make an instance of a preprocessor""" preprocessor = SVG2PDFPreprocessor(**kwargs) preprocessor.enabled = True return preprocessor - def test_constructor(self): """Can a SVG2PDFPreprocessor be constructed?""" self.build_preprocessor() - - @onlyif_cmds_exist('inkscape') + @onlyif_cmds_exist("inkscape") def test_output(self): """Test the output of the SVG2PDFPreprocessor""" nb = self.build_notebook() res = self.build_resources() preprocessor = self.build_preprocessor() nb, res = preprocessor(nb, res) - self.assertIn('application/pdf', nb.cells[0].outputs[0].data) + self.assertIn("application/pdf", nb.cells[0].outputs[0].data) - @onlyif_cmds_exist('inkscape') - @patch('subprocess.Popen') + @onlyif_cmds_exist("inkscape") + @patch("subprocess.Popen") def test_inkscape_version_default(self, mock_popen): - mock_popen().communicate.return_value = (b'Inkscape 0.92.3 (2405546, 2018-03-11)', b'') + mock_popen().communicate.return_value = (b"Inkscape 0.92.3 (2405546, 2018-03-11)", b"") mock_popen().returncode = 0 preprocessor = self.build_preprocessor() - assert preprocessor.inkscape_version == '0.92.3' - - def test_inkscape_pre_v1_command(self): - preprocessor = self.build_preprocessor(inkscape_version='0.92.3') - assert preprocessor.command == '0.92.3' + assert preprocessor.inkscape_version == "0.92.3" def test_inkscape_pre_v1_command(self): - preprocessor = self.build_preprocessor(inkscape='fake-inkscape', inkscape_version='0.92.3') + preprocessor = self.build_preprocessor(inkscape="fake-inkscape", inkscape_version="0.92.3") assert preprocessor.command == [ - 'fake-inkscape', - '--without-gui', - '--export-pdf={to_filename}', - '{from_filename}' + "fake-inkscape", + "--without-gui", + "--export-pdf={to_filename}", + "{from_filename}", ] def test_inkscape_v1_command(self): - preprocessor = self.build_preprocessor(inkscape='fake-inkscape', inkscape_version='1.0beta2') + preprocessor = self.build_preprocessor( + inkscape="fake-inkscape", inkscape_version="1.0beta2" + ) assert preprocessor.command == [ - 'fake-inkscape', - '--export-filename={to_filename}', - '{from_filename}' + "fake-inkscape", + "--export-filename={to_filename}", + "{from_filename}", ] diff -Nru nbconvert-6.4.4/nbconvert/preprocessors/tests/test_tagremove.py nbconvert-6.5.3/nbconvert/preprocessors/tests/test_tagremove.py --- nbconvert-6.4.4/nbconvert/preprocessors/tests/test_tagremove.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/preprocessors/tests/test_tagremove.py 2022-08-11 11:50:51.000000000 +0000 @@ -7,8 +7,8 @@ from nbformat import v4 as nbformat -from .base import PreprocessorTestsBase from ..tagremove import TagRemovePreprocessor +from .base import PreprocessorTestsBase class TestTagRemove(PreprocessorTestsBase): @@ -22,33 +22,38 @@ notebook = super().build_notebook() # Add a few empty cells notebook.cells[0].outputs.extend( - [nbformat.new_output("display_data", - data={'text/plain': 'i'}, - metadata={'tags': ["hide_one_output"]} - ), - ]) + [ + nbformat.new_output( + "display_data", data={"text/plain": "i"}, metadata={"tags": ["hide_one_output"]} + ), + ] + ) outputs_to_be_removed = [ - nbformat.new_output("display_data", - data={'text/plain': "remove_my_output"}), + nbformat.new_output("display_data", data={"text/plain": "remove_my_output"}), ] outputs_to_be_kept = [ - nbformat.new_output("stream", - name="stdout", - text="remove_my_output", - ), + nbformat.new_output( + "stream", + name="stdout", + text="remove_my_output", + ), ] notebook.cells.extend( - [nbformat.new_code_cell(source="display('remove_my_output')", - execution_count=2, - outputs=outputs_to_be_removed, - metadata={"tags": ["hide_all_outputs"]}), - - nbformat.new_code_cell(source="print('remove this cell')", - execution_count=3, - outputs=outputs_to_be_kept, - metadata={"tags": ["hide_this_cell"]}), - ] - ) + [ + nbformat.new_code_cell( + source="display('remove_my_output')", + execution_count=2, + outputs=outputs_to_be_removed, + metadata={"tags": ["hide_all_outputs"]}, + ), + nbformat.new_code_cell( + source="print('remove this cell')", + execution_count=3, + outputs=outputs_to_be_kept, + metadata={"tags": ["hide_this_cell"]}, + ), + ] + ) return notebook @@ -68,8 +73,8 @@ res = self.build_resources() preprocessor = self.build_preprocessor() preprocessor.remove_cell_tags.add("hide_this_cell") - preprocessor.remove_all_outputs_tags.add('hide_all_outputs') - preprocessor.remove_single_output_tags.add('hide_one_output') + preprocessor.remove_all_outputs_tags.add("hide_all_outputs") + preprocessor.remove_single_output_tags.add("hide_one_output") nb, res = preprocessor(nb, res) diff -Nru nbconvert-6.4.4/nbconvert/templates/README.md nbconvert-6.5.3/nbconvert/templates/README.md --- nbconvert-6.4.4/nbconvert/templates/README.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/templates/README.md 2022-08-11 11:50:51.000000000 +0000 @@ -1,5 +1,4 @@ -README FIRST -============ +# README FIRST Please do not add new templates for nbconvert here. diff -Nru nbconvert-6.4.4/nbconvert/templates/skeleton/README.md nbconvert-6.5.3/nbconvert/templates/skeleton/README.md --- nbconvert-6.4.4/nbconvert/templates/skeleton/README.md 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/templates/skeleton/README.md 2022-08-11 11:50:51.000000000 +0000 @@ -2,9 +2,9 @@ This directory contains the template skeleton files. -Do not modify the contents of the `../latex/skeleton` folder. Instead, +Do not modify the contents of the `../latex/skeleton` folder. Instead, if you need to, make modifications to the files in this folder and then run -`make` to generate the corresponding latex skeleton files in the +`make` to generate the corresponding latex skeleton files in the `../latex/skeleton` folder. If you would like to share your resulting templates with others, we encourage diff -Nru nbconvert-6.4.4/nbconvert/tests/base.py nbconvert-6.5.3/nbconvert/tests/base.py --- nbconvert-6.4.4/nbconvert/tests/base.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/base.py 2022-08-11 11:50:51.000000000 +0000 @@ -3,28 +3,39 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -import io -import os +import contextlib import glob +import os import shlex import shutil import sys import unittest -import nbconvert -from subprocess import Popen, PIPE +from subprocess import PIPE, Popen +from tempfile import TemporaryDirectory from nbformat import v4, write -from testpath.tempdir import TemporaryWorkingDirectory + +import nbconvert + +from ..utils import _contextlib_chdir class TestsBase(unittest.TestCase): """Base tests class. Contains useful fuzzy comparison and nbconvert functions.""" - - def fuzzy_compare(self, a, b, newlines_are_spaces=True, tabs_are_spaces=True, - fuzzy_spacing=True, ignore_spaces=False, - ignore_newlines=False, case_sensitive=False, leave_padding=False): + def fuzzy_compare( + self, + a, + b, + newlines_are_spaces=True, + tabs_are_spaces=True, + fuzzy_spacing=True, + ignore_spaces=False, + ignore_newlines=False, + case_sensitive=False, + leave_padding=False, + ): """ Performs a fuzzy comparison of two strings. A fuzzy comparison is a comparison that ignores insignificant differences in the two comparands. @@ -37,24 +48,24 @@ b = b.strip() if ignore_newlines: - a = a.replace('\n', '') - b = b.replace('\n', '') + a = a.replace("\n", "") + b = b.replace("\n", "") if newlines_are_spaces: - a = a.replace('\n', ' ') - b = b.replace('\n', ' ') + a = a.replace("\n", " ") + b = b.replace("\n", " ") if tabs_are_spaces: - a = a.replace('\t', ' ') - b = b.replace('\t', ' ') + a = a.replace("\t", " ") + b = b.replace("\t", " ") if ignore_spaces: - a = a.replace(' ', '') - b = b.replace(' ', '') + a = a.replace(" ", "") + b = b.replace(" ", "") if fuzzy_spacing: - a = self.recursive_replace(a, ' ', ' ') - b = self.recursive_replace(b, ' ', ' ') + a = self.recursive_replace(a, " ", " ") + b = self.recursive_replace(b, " ", " ") if not case_sensitive: a = a.lower() @@ -86,15 +97,12 @@ text = text.replace(search, replacement) return text + @contextlib.contextmanager def create_temp_cwd(self, copy_filenames=None): - temp_dir = TemporaryWorkingDirectory() - - #Copy the files if requested. - if copy_filenames is not None: - self.copy_files_to(copy_filenames, dest=temp_dir.name) - - #Return directory handler - return temp_dir + with TemporaryDirectory() as td, _contextlib_chdir.chdir(td): + if copy_filenames is not None: # Copy the files if requested. + self.copy_files_to(copy_filenames, dest=td) + yield td # Return directory handler @classmethod def merge_dicts(cls, *dict_args): @@ -106,10 +114,10 @@ def create_empty_notebook(self, path): nb = v4.new_notebook() - with io.open(path, 'w', encoding='utf-8') as f: + with open(path, "w", encoding="utf-8") as f: write(nb, f, 4) - def copy_files_to(self, copy_filenames, dest='.'): + def copy_files_to(self, copy_filenames, dest="."): "Copy test files into the destination directory" if not os.path.isdir(dest): os.makedirs(dest) @@ -122,12 +130,12 @@ def _get_files_path(self): - #Get the relative path to this module in the IPython directory. - names = self.__module__.split('.')[1:-1] - names.append('files') + # Get the relative path to this module in the IPython directory. + names = self.__module__.split(".")[1:-1] + names.append("files") - #Build a path using the nbconvert directory and the relative path we just - #found. + # Build a path using the nbconvert directory and the relative path we just + # found. path = os.path.dirname(nbconvert.__file__) return os.path.join(path, *names) @@ -144,12 +152,12 @@ ignore_return_code : optional bool (default False) Throw an OSError if the return code """ - cmd = [sys.executable, '-m', 'nbconvert'] - if sys.platform == 'win32': + cmd = [sys.executable, "-m", "nbconvert"] + if sys.platform == "win32": if isinstance(parameters, (str,)): - cmd = ' '.join(cmd) + ' ' + parameters + cmd = " ".join(cmd) + " " + parameters else: - cmd = ' '.join(cmd + parameters) + cmd = " ".join(cmd + parameters) else: if isinstance(parameters, (str,)): parameters = shlex.split(parameters) @@ -157,8 +165,8 @@ p = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE) stdout, stderr = p.communicate(input=stdin) if not (p.returncode == 0 or ignore_return_code): - raise OSError(stderr.decode('utf8', 'replace')) - return stdout.decode('utf8', 'replace'), stderr.decode('utf8', 'replace') + raise OSError(stderr.decode("utf8", "replace")) + return stdout.decode("utf8", "replace"), stderr.decode("utf8", "replace") def assert_big_text_equal(a, b, chunk_size=80): @@ -168,13 +176,15 @@ to give better info than vanilla assertEqual for large text blobs. """ for i in range(0, len(a), chunk_size): - chunk_a = a[i:i + chunk_size] - chunk_b = b[i:i + chunk_size] + chunk_a = a[i : i + chunk_size] + chunk_b = b[i : i + chunk_size] assert chunk_a == chunk_b, "[offset: %i]\n%r != \n%r" % (i, chunk_a, chunk_b) if len(a) > len(b): - raise AssertionError("Length doesn't match (%i > %i). Extra text:\n%r" % ( - len(a), len(b), a[len(b):])) + raise AssertionError( + "Length doesn't match (%i > %i). Extra text:\n%r" % (len(a), len(b), a[len(b) :]) + ) elif len(a) < len(b): - raise AssertionError("Length doesn't match (%i < %i). Extra text:\n%r" % ( - len(a), len(b), a[len(b):])) + raise AssertionError( + "Length doesn't match (%i < %i). Extra text:\n%r" % (len(a), len(b), a[len(b) :]) + ) diff -Nru nbconvert-6.4.4/nbconvert/tests/exporter_entrypoint/eptest.py nbconvert-6.5.3/nbconvert/tests/exporter_entrypoint/eptest.py --- nbconvert-6.4.4/nbconvert/tests/exporter_entrypoint/eptest.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/exporter_entrypoint/eptest.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,8 +1,10 @@ from nbconvert.exporters import Exporter + class DummyExporter(Exporter): pass + class DummyScriptExporter(Exporter): def from_notebook_node(self, nb, resources=None, **kw): - return 'dummy-script-exported', resources + return "dummy-script-exported", resources diff -Nru nbconvert-6.4.4/nbconvert/tests/fake_exporters.py nbconvert-6.5.3/nbconvert/tests/fake_exporters.py --- nbconvert-6.4.4/nbconvert/tests/fake_exporters.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/fake_exporters.py 2022-08-11 11:50:51.000000000 +0000 @@ -12,14 +12,14 @@ """ My custom exporter """ - - @default('file_extension') + + @default("file_extension") def _file_extension_default(self): """ The new file extension is `.test_ext` """ - return '.test_ext' + return ".test_ext" - @default('template_extension') + @default("template_extension") def _template_extension_default(self): - return '.html.j2' + return ".html.j2" diff -Nru nbconvert-6.4.4/nbconvert/tests/files/hello.py nbconvert-6.5.3/nbconvert/tests/files/hello.py --- nbconvert-6.4.4/nbconvert/tests/files/hello.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/files/hello.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,7 +1,7 @@ from nbconvert.writers.base import WriterBase -class HelloWriter(WriterBase): +class HelloWriter(WriterBase): def write(self, output, resources, notebook_name=None, **kw): - with open('hello.txt', 'w') as outfile: - outfile.write('hello world') + with open("hello.txt", "w") as outfile: + outfile.write("hello world") diff -Nru nbconvert-6.4.4/nbconvert/tests/files/jupyter_nbconvert_config.py nbconvert-6.5.3/nbconvert/tests/files/jupyter_nbconvert_config.py --- nbconvert-6.4.4/nbconvert/tests/files/jupyter_nbconvert_config.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/files/jupyter_nbconvert_config.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,5 @@ c = get_config() -#Export all the notebooks in the current directory to the sphinx_howto format. -c.NbConvertApp.notebooks = ['notebook1.ipynb'] -c.NbConvertApp.export_format = 'python' - +# Export all the notebooks in the current directory to the sphinx_howto format. +c.NbConvertApp.notebooks = ["notebook1.ipynb"] +c.NbConvertApp.export_format = "python" diff -Nru nbconvert-6.4.4/nbconvert/tests/files/notebook1.html nbconvert-6.5.3/nbconvert/tests/files/notebook1.html --- nbconvert-6.4.4/nbconvert/tests/files/notebook1.html 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/files/notebook1.html 2022-08-11 11:50:51.000000000 +0000 @@ -9204,15 +9204,15 @@ } /* Flexible box model classes */ /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */ -/* This file is a compatability layer. It allows the usage of flexible box +/* This file is a compatability layer. It allows the usage of flexible box model layouts accross multiple browsers, including older browsers. The newest, universal implementation of the flexible box model is used when available (see -`Modern browsers` comments below). Browsers that are known to implement this +`Modern browsers` comments below). Browsers that are known to implement this new spec completely include: Firefox 28.0+ Chrome 29.0+ - Internet Explorer 11+ + Internet Explorer 11+ Opera 17.0+ Browsers not listed, including Safari, are supported via the styling under the @@ -12594,7 +12594,7 @@ background: #f7f7f7; border-top: 1px solid #cfcfcf; border-bottom: 1px solid #cfcfcf; - /* This injects handle bars (a short, wide = symbol) for + /* This injects handle bars (a short, wide = symbol) for the resize handle. */ } div#pager .ui-resizable-handle::after { @@ -13069,12 +13069,12 @@ }, displayAlign: 'center', CommonHTML: { - linebreaks: { - automatic: true + linebreaks: { + automatic: true } } }); - + MathJax.Hub.Queue(["Typeset", MathJax.Hub]); } } @@ -13248,7 +13248,7 @@
In [ ]:
-
 
+

 
@@ -13263,7 +13263,7 @@ - + diff -Nru nbconvert-6.4.4/nbconvert/tests/files/override.py nbconvert-6.5.3/nbconvert/tests/files/override.py --- nbconvert-6.4.4/nbconvert/tests/files/override.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/files/override.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,5 @@ c = get_config() -#Export all the notebooks in the current directory to the sphinx_howto format. -c.NbConvertApp.notebooks = ['notebook2.ipynb'] -c.NbConvertApp.export_format = 'python' - +# Export all the notebooks in the current directory to the sphinx_howto format. +c.NbConvertApp.notebooks = ["notebook2.ipynb"] +c.NbConvertApp.export_format = "python" diff -Nru nbconvert-6.4.4/nbconvert/tests/test_nbconvertapp.py nbconvert-6.5.3/nbconvert/tests/test_nbconvertapp.py --- nbconvert-6.4.4/nbconvert/tests/test_nbconvertapp.py 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/nbconvert/tests/test_nbconvertapp.py 2022-08-11 11:50:51.000000000 +0000 @@ -1,26 +1,25 @@ -# -*- coding: utf-8 -*- """Test NbConvertApp""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os -import io -import nbformat from tempfile import TemporaryDirectory -from .base import TestsBase +import nbformat +import pytest +from traitlets.tests.utils import check_help_all_output + +from nbconvert.exporters import HTMLExporter + from ..postprocessors import PostProcessorBase from ..tests.utils import onlyif_cmds_exist -from nbconvert import nbconvertapp -from nbconvert.exporters import Exporter, HTMLExporter - -from traitlets.tests.utils import check_help_all_output -import pytest +from .base import TestsBase -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- # Classes and functions -#----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- + class DummyPost(PostProcessorBase): def postprocess(self, filename): @@ -30,45 +29,44 @@ class TestNbConvertApp(TestsBase): """Collection of NbConvertApp tests""" - def test_notebook_help(self): """Will help show if no notebooks are specified?""" with self.create_temp_cwd(): - out, err = self.nbconvert('--log-level 0', ignore_return_code=True) + out, err = self.nbconvert("--log-level 0", ignore_return_code=True) self.assertIn("--help-all", out) def test_help_output(self): """ipython nbconvert --help-all works""" - check_help_all_output('nbconvert') + check_help_all_output("nbconvert") def test_glob(self): """ Do search patterns work for notebook names? """ - with self.create_temp_cwd(['notebook*.ipynb']): - self.nbconvert('--to python *.ipynb --log-level 0') - assert os.path.isfile('notebook1.py') - assert os.path.isfile('notebook2.py') + with self.create_temp_cwd(["notebook*.ipynb"]): + self.nbconvert("--to python *.ipynb --log-level 0") + assert os.path.isfile("notebook1.py") + assert os.path.isfile("notebook2.py") def test_glob_subdir(self): """ Do search patterns work for subdirectory notebook names? """ with self.create_temp_cwd(): - self.copy_files_to(['notebook*.ipynb'], 'subdir/') - self.nbconvert('--to python --log-level 0 ' + - os.path.join('subdir', '*.ipynb')) - assert os.path.isfile(os.path.join('subdir', 'notebook1.py')) - assert os.path.isfile(os.path.join('subdir', 'notebook2.py')) + self.copy_files_to(["notebook*.ipynb"], "subdir/") + self.nbconvert("--to python --log-level 0 " + os.path.join("subdir", "*.ipynb")) + assert os.path.isfile(os.path.join("subdir", "notebook1.py")) + assert os.path.isfile(os.path.join("subdir", "notebook2.py")) def test_build_dir(self): """build_directory affects export location""" with self.create_temp_cwd(): - self.copy_files_to(['notebook*.ipynb'], 'subdir/') - self.nbconvert('--to python --log-level 0 --output-dir . ' + - os.path.join('subdir', '*.ipynb')) - assert os.path.isfile('notebook1.py') - assert os.path.isfile('notebook2.py') + self.copy_files_to(["notebook*.ipynb"], "subdir/") + self.nbconvert( + "--to python --log-level 0 --output-dir . " + os.path.join("subdir", "*.ipynb") + ) + assert os.path.isfile("notebook1.py") + assert os.path.isfile("notebook2.py") def test_convert_full_qualified_name(self): """ @@ -76,274 +74,270 @@ package, import and use it. """ with self.create_temp_cwd(): - self.copy_files_to(['notebook*.ipynb'], 'subdir') - self.nbconvert('--to nbconvert.tests.fake_exporters.MyExporter --log-level 0 ' + - os.path.join('subdir', '*.ipynb')) - assert os.path.isfile(os.path.join('subdir', 'notebook1.test_ext')) - assert os.path.isfile(os.path.join('subdir', 'notebook2.test_ext')) + self.copy_files_to(["notebook*.ipynb"], "subdir") + self.nbconvert( + "--to nbconvert.tests.fake_exporters.MyExporter --log-level 0 " + + os.path.join("subdir", "*.ipynb") + ) + assert os.path.isfile(os.path.join("subdir", "notebook1.test_ext")) + assert os.path.isfile(os.path.join("subdir", "notebook2.test_ext")) def test_explicit(self): """ Do explicit notebook names work? """ - with self.create_temp_cwd(['notebook*.ipynb']): - self.nbconvert('--log-level 0 --to python notebook2') - assert not os.path.isfile('notebook1.py') - assert os.path.isfile('notebook2.py') + with self.create_temp_cwd(["notebook*.ipynb"]): + self.nbconvert("--log-level 0 --to python notebook2") + assert not os.path.isfile("notebook1.py") + assert os.path.isfile("notebook2.py") def test_clear_output(self): """ Can we clear outputs? """ - with self.create_temp_cwd(['notebook*.ipynb']) as td: - self.nbconvert('--clear-output notebook1') - assert os.path.isfile('notebook1.ipynb') - with open('notebook1.ipynb', encoding='utf8') as f: + with self.create_temp_cwd(["notebook*.ipynb"]) as td: + self.nbconvert("--clear-output notebook1") + assert os.path.isfile("notebook1.ipynb") + with open("notebook1.ipynb", encoding="utf8") as f: nb = nbformat.read(f, 4) for cell in nb.cells: # Skip markdown cells - if 'outputs' in cell: + if "outputs" in cell: assert cell.outputs == [] def test_absolute_template_file(self): """--template-file '/path/to/template.tpl'""" - with self.create_temp_cwd(['notebook*.ipynb']), TemporaryDirectory() as td: - template = os.path.join(td, 'mytemplate.tpl') - test_output = 'success!' - with open(template, 'w') as f: + with self.create_temp_cwd(["notebook*.ipynb"]), TemporaryDirectory() as td: + template = os.path.join(td, "mytemplate.tpl") + test_output = "success!" + with open(template, "w") as f: f.write(test_output) - self.nbconvert('--log-level 0 notebook2 --to html --template-file %s' % template) - assert os.path.isfile('notebook2.html') - with open('notebook2.html', 'r', encoding="utf8") as f: + self.nbconvert("--log-level 0 notebook2 --to html --template-file %s" % template) + assert os.path.isfile("notebook2.html") + with open("notebook2.html", encoding="utf8") as f: text = f.read() assert text == test_output def test_relative_template_file(self): """Test --template-file 'relative/path.tpl'""" - with self.create_temp_cwd(['notebook*.ipynb']): - os.mkdir('relative') - template = os.path.join('relative', 'path.tpl') - test_output = 'success!' - with open(template, 'w') as f: + with self.create_temp_cwd(["notebook*.ipynb"]): + os.mkdir("relative") + template = os.path.join("relative", "path.tpl") + test_output = "success!" + with open(template, "w") as f: f.write(test_output) - self.nbconvert('--log-level 0 notebook2 --to html --template-file %s' % template) - assert os.path.isfile('notebook2.html') - with open('notebook2.html', 'r', encoding="utf8") as f: + self.nbconvert("--log-level 0 notebook2 --to html --template-file %s" % template) + assert os.path.isfile("notebook2.html") + with open("notebook2.html", encoding="utf8") as f: text = f.read() assert text == test_output - @onlyif_cmds_exist('pandoc', 'xelatex') + @onlyif_cmds_exist("pandoc", "xelatex") def test_filename_spaces(self): """ Generate PDFs with graphics if notebooks have spaces in the name? """ - with self.create_temp_cwd(['notebook2.ipynb']): - os.rename('notebook2.ipynb', 'notebook with spaces.ipynb') - self.nbconvert('--log-level 0 --to pdf' - ' "notebook with spaces"' - ' --PDFExporter.latex_count=1' - ' --PDFExporter.verbose=True' + with self.create_temp_cwd(["notebook2.ipynb"]): + os.rename("notebook2.ipynb", "notebook with spaces.ipynb") + self.nbconvert( + "--log-level 0 --to pdf" + ' "notebook with spaces"' + " --PDFExporter.latex_count=1" + " --PDFExporter.verbose=True" ) - assert os.path.isfile('notebook with spaces.pdf') + assert os.path.isfile("notebook with spaces.pdf") @pytest.mark.network def test_webpdf_with_chromium(self): """ Generate PDFs if chromium allowed to be downloaded? """ - with self.create_temp_cwd(['notebook2.ipynb']): - self.nbconvert('--to webpdf ' - '--allow-chromium-download ' - '"notebook2"' - ) - assert os.path.isfile('notebook2.pdf') + with self.create_temp_cwd(["notebook2.ipynb"]): + self.nbconvert('--to webpdf --allow-chromium-download "notebook2"') + assert os.path.isfile("notebook2.pdf") - @onlyif_cmds_exist('pandoc', 'xelatex') + @onlyif_cmds_exist("pandoc", "xelatex") def test_pdf(self): """ Check to see if pdfs compile, even if strikethroughs are included. """ - with self.create_temp_cwd(['notebook2.ipynb']): - self.nbconvert('--log-level 0 --to pdf' - ' "notebook2"' - ' --PDFExporter.latex_count=1' - ' --PDFExporter.verbose=True' + with self.create_temp_cwd(["notebook2.ipynb"]): + self.nbconvert( + "--log-level 0 --to pdf" + ' "notebook2"' + " --PDFExporter.latex_count=1" + " --PDFExporter.verbose=True" ) - assert os.path.isfile('notebook2.pdf') + assert os.path.isfile("notebook2.pdf") def test_post_processor(self): """Do post processors work?""" - with self.create_temp_cwd(['notebook1.ipynb']): - out, err = self.nbconvert('--log-level 0 --to python notebook1 ' - '--post nbconvert.tests.test_nbconvertapp.DummyPost') - self.assertIn('Dummy:notebook1.py', out) + with self.create_temp_cwd(["notebook1.ipynb"]): + out, err = self.nbconvert( + "--log-level 0 --to python notebook1 --post nbconvert.tests.test_nbconvertapp.DummyPost" + ) + self.assertIn("Dummy:notebook1.py", out) - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_spurious_cr(self): """Check for extra CR characters""" - with self.create_temp_cwd(['notebook2.ipynb']): - self.nbconvert('--log-level 0 --to latex notebook2') - assert os.path.isfile('notebook2.tex') - with open('notebook2.tex') as f: + with self.create_temp_cwd(["notebook2.ipynb"]): + self.nbconvert("--log-level 0 --to latex notebook2") + assert os.path.isfile("notebook2.tex") + with open("notebook2.tex") as f: tex = f.read() - self.nbconvert('--log-level 0 --to html notebook2') - assert os.path.isfile('notebook2.html') - with open('notebook2.html', 'r', encoding="utf8") as f: + self.nbconvert("--log-level 0 --to html notebook2") + assert os.path.isfile("notebook2.html") + with open("notebook2.html", encoding="utf8") as f: html = f.read() - self.assertEqual(tex.count('\r'), tex.count('\r\n')) - self.assertEqual(html.count('\r'), html.count('\r\n')) + self.assertEqual(tex.count("\r"), tex.count("\r\n")) + self.assertEqual(html.count("\r"), html.count("\r\n")) - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_png_base64_html_ok(self): """Is embedded png data well formed in HTML?""" - with self.create_temp_cwd(['notebook2.ipynb']): - self.nbconvert('--log-level 0 --to HTML ' - 'notebook2.ipynb --template lab') - assert os.path.isfile('notebook2.html') - with open('notebook2.html', 'r', encoding="utf8") as f: + with self.create_temp_cwd(["notebook2.ipynb"]): + self.nbconvert("--log-level 0 --to HTML notebook2.ipynb --template lab") + assert os.path.isfile("notebook2.html") + with open("notebook2.html", encoding="utf8") as f: assert "data:image/png;base64,b'" not in f.read() - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_template(self): """ Do export templates work? """ - with self.create_temp_cwd(['notebook2.ipynb']): - self.nbconvert('--log-level 0 --to slides ' - 'notebook2.ipynb') - assert os.path.isfile('notebook2.slides.html') - with open('notebook2.slides.html', 'r', encoding="utf8") as f: - assert '/reveal.css' in f.read() + with self.create_temp_cwd(["notebook2.ipynb"]): + self.nbconvert("--log-level 0 --to slides notebook2.ipynb") + assert os.path.isfile("notebook2.slides.html") + with open("notebook2.slides.html", encoding="utf8") as f: + assert "/reveal.css" in f.read() def test_output_ext(self): """test --output=outputfile[.ext]""" - with self.create_temp_cwd(['notebook1.ipynb']): - self.nbconvert('--log-level 0 --to python ' - 'notebook1.ipynb --output nb.py') - assert os.path.exists('nb.py') - - self.nbconvert('--log-level 0 --to python ' - 'notebook1.ipynb --output nb2') - assert os.path.exists('nb2.py') + with self.create_temp_cwd(["notebook1.ipynb"]): + self.nbconvert("--log-level 0 --to python notebook1.ipynb --output nb.py") + assert os.path.exists("nb.py") + + self.nbconvert("--log-level 0 --to python notebook1.ipynb --output nb2") + assert os.path.exists("nb2.py") def test_glob_explicit(self): """ Can a search pattern be used along with matching explicit notebook names? """ - with self.create_temp_cwd(['notebook*.ipynb']): - self.nbconvert('--log-level 0 --to python ' - '*.ipynb notebook1.ipynb notebook2.ipynb') - assert os.path.isfile('notebook1.py') - assert os.path.isfile('notebook2.py') + with self.create_temp_cwd(["notebook*.ipynb"]): + self.nbconvert("--log-level 0 --to python *.ipynb notebook1.ipynb notebook2.ipynb") + assert os.path.isfile("notebook1.py") + assert os.path.isfile("notebook2.py") def test_explicit_glob(self): """ Can explicit notebook names be used and then a matching search pattern? """ - with self.create_temp_cwd(['notebook*.ipynb']): - self.nbconvert('--log-level 0 --to=python ' - 'notebook1.ipynb notebook2.ipynb *.ipynb') - assert os.path.isfile('notebook1.py') - assert os.path.isfile('notebook2.py') + with self.create_temp_cwd(["notebook*.ipynb"]): + self.nbconvert("--log-level 0 --to=python notebook1.ipynb notebook2.ipynb *.ipynb") + assert os.path.isfile("notebook1.py") + assert os.path.isfile("notebook2.py") def test_default_config(self): """ Does the default config work? """ - with self.create_temp_cwd(['notebook*.ipynb', 'jupyter_nbconvert_config.py']): - self.nbconvert('--log-level 0') - assert os.path.isfile('notebook1.py') - assert not os.path.isfile('notebook2.py') + with self.create_temp_cwd(["notebook*.ipynb", "jupyter_nbconvert_config.py"]): + self.nbconvert("--log-level 0") + assert os.path.isfile("notebook1.py") + assert not os.path.isfile("notebook2.py") def test_override_config(self): """ Can the default config be overridden? """ - with self.create_temp_cwd(['notebook*.ipynb', - 'jupyter_nbconvert_config.py', - 'override.py']): + with self.create_temp_cwd( + ["notebook*.ipynb", "jupyter_nbconvert_config.py", "override.py"] + ): self.nbconvert('--log-level 0 --config="override.py"') - assert not os.path.isfile('notebook1.py') - assert os.path.isfile('notebook2.py') + assert not os.path.isfile("notebook1.py") + assert os.path.isfile("notebook2.py") def test_accents_in_filename(self): """ Can notebook names include accents? """ with self.create_temp_cwd(): - self.create_empty_notebook(u'nb1_análisis.ipynb') - self.nbconvert('--log-level 0 --to Python nb1_*') - assert os.path.isfile(u'nb1_análisis.py') + self.create_empty_notebook("nb1_análisis.ipynb") + self.nbconvert("--log-level 0 --to Python nb1_*") + assert os.path.isfile("nb1_análisis.py") - @onlyif_cmds_exist('xelatex', 'pandoc') + @onlyif_cmds_exist("xelatex", "pandoc") def test_filename_accent_pdf(self): """ Generate PDFs if notebooks have an accent in their name? """ with self.create_temp_cwd(): - self.create_empty_notebook(u'nb1_análisis.ipynb') - self.nbconvert('--log-level 0 --to pdf "nb1_*"' - ' --PDFExporter.latex_count=1' - ' --PDFExporter.verbose=True') - assert os.path.isfile(u'nb1_análisis.pdf') + self.create_empty_notebook("nb1_análisis.ipynb") + self.nbconvert( + '--log-level 0 --to pdf "nb1_*"' + " --PDFExporter.latex_count=1" + " --PDFExporter.verbose=True" + ) + assert os.path.isfile("nb1_análisis.pdf") - @pytest.mark.skipif(os.name == 'nt', reason='CLI parsing does not work the same on Windows') + @pytest.mark.skipif(os.name == "nt", reason="CLI parsing does not work the same on Windows") def test_cwd_plugin(self): """ Verify that an extension in the cwd can be imported. """ - with self.create_temp_cwd(['hello.py']): - self.create_empty_notebook(u'empty.ipynb') - assert os.path.isfile('hello.py') - self.nbconvert('empty --to html --NbConvertApp.writer_class=\'hello.HelloWriter\'') - assert os.path.isfile(u'hello.txt') + with self.create_temp_cwd(["hello.py"]): + self.create_empty_notebook("empty.ipynb") + assert os.path.isfile("hello.py") + self.nbconvert("empty --to html --NbConvertApp.writer_class='hello.HelloWriter'") + assert os.path.isfile("hello.txt") def test_output_suffix(self): """ Verify that the output suffix is applied """ with self.create_temp_cwd(): - self.create_empty_notebook('empty.ipynb') - self.nbconvert('empty.ipynb --to notebook') - assert os.path.isfile('empty.nbconvert.ipynb') + self.create_empty_notebook("empty.ipynb") + self.nbconvert("empty.ipynb --to notebook") + assert os.path.isfile("empty.nbconvert.ipynb") def test_different_build_dir(self): """ Verify that the output suffix is not applied """ with self.create_temp_cwd(): - self.create_empty_notebook('empty.ipynb') - os.mkdir('output') - self.nbconvert( - 'empty.ipynb --to notebook ' - '--FilesWriter.build_directory=output') - assert os.path.isfile('output/empty.ipynb') + self.create_empty_notebook("empty.ipynb") + os.mkdir("output") + self.nbconvert("empty.ipynb --to notebook --FilesWriter.build_directory=output") + assert os.path.isfile("output/empty.ipynb") def test_inplace(self): """ Verify that the notebook is converted in place """ with self.create_temp_cwd(): - self.create_empty_notebook('empty.ipynb') - self.nbconvert('empty.ipynb --inplace') - assert os.path.isfile('empty.ipynb') - assert not os.path.isfile('empty.nbconvert.ipynb') - assert not os.path.isfile('empty.html') + self.create_empty_notebook("empty.ipynb") + self.nbconvert("empty.ipynb --inplace") + assert os.path.isfile("empty.ipynb") + assert not os.path.isfile("empty.nbconvert.ipynb") + assert not os.path.isfile("empty.html") def test_no_prompt(self): """ Verify that the html has no prompts when given --no-prompt. """ with self.create_temp_cwd(["notebook1.ipynb"]): - self.nbconvert('notebook1.ipynb --log-level 0 --no-prompt --to html') - assert os.path.isfile('notebook1.html') - with open("notebook1.html", 'r', encoding="utf8") as f: + self.nbconvert("notebook1.ipynb --log-level 0 --no-prompt --to html") + assert os.path.isfile("notebook1.html") + with open("notebook1.html", encoding="utf8") as f: text = f.read() assert "In [" not in text assert "Out[6]" not in text - self.nbconvert('notebook1.ipynb --log-level 0 --to html') - assert os.path.isfile('notebook1.html') - with open("notebook1.html", 'r', encoding="utf8") as f: + self.nbconvert("notebook1.ipynb --log-level 0 --to html") + assert os.path.isfile("notebook1.html") + with open("notebook1.html", encoding="utf8") as f: text2 = f.read() assert "In [" in text2 assert "Out[6]" in text2 @@ -353,51 +347,54 @@ Verify that the html has tags in cell attributes if they exist. """ with self.create_temp_cwd(["notebook_tags.ipynb"]): - self.nbconvert('notebook_tags.ipynb --log-level 0 --to html') - assert os.path.isfile('notebook_tags.html') - with open("notebook_tags.html", 'r', encoding="utf8") as f: + self.nbconvert("notebook_tags.ipynb --log-level 0 --to html") + assert os.path.isfile("notebook_tags.html") + with open("notebook_tags.html", encoding="utf8") as f: text = f.read() - assert 'celltag_mycelltag celltag_mysecondcelltag' in text - assert 'celltag_mymarkdowncelltag' in text - + assert "celltag_mycelltag celltag_mysecondcelltag" in text + assert "celltag_mymarkdowncelltag" in text def test_no_input(self): """ Verify that the html has no input when given --no-input. """ with self.create_temp_cwd(["notebook1.ipynb"]): - self.nbconvert('notebook1.ipynb --log-level 0 --no-input --to html') - assert os.path.isfile('notebook1.html') - with open("notebook1.html", 'r', encoding="utf8") as f: + self.nbconvert("notebook1.ipynb --log-level 0 --no-input --to html") + assert os.path.isfile("notebook1.html") + with open("notebook1.html", encoding="utf8") as f: text = f.read() assert "In [" not in text assert "Out[6]" not in text - assert ('x' - ',' - 'y' - ',' - 'z ' - '= ' - 'symbols' - '(' - ''x y z'' - ')') not in text - self.nbconvert('notebook1.ipynb --log-level 0 --to html') - assert os.path.isfile('notebook1.html') - with open("notebook1.html", 'r', encoding="utf8") as f: + assert ( + 'x' + ',' + 'y' + ',' + 'z ' + '= ' + 'symbols' + '(' + "'x y z'" + ')' + ) not in text + self.nbconvert("notebook1.ipynb --log-level 0 --to html") + assert os.path.isfile("notebook1.html") + with open("notebook1.html", encoding="utf8") as f: text2 = f.read() assert "In [" in text2 assert "Out[6]" in text2 - assert ('x' - ',' - 'y' - ',' - 'z ' - '= ' - 'symbols' - '(' - ''x y z'' - ')') in text2 + assert ( + 'x' + ',' + 'y' + ',' + 'z ' + '= ' + 'symbols' + '(' + "'x y z'" + ')' + ) in text2 def test_allow_errors(self): """ @@ -405,38 +402,46 @@ encountered, but that conversion continues if '--allow-errors' is used in addition. """ - with self.create_temp_cwd(['notebook3*.ipynb']): + with self.create_temp_cwd(["notebook3*.ipynb"]): # Convert notebook containing a cell that raises an error, # both without and with cell execution enabled. - output1, _ = self.nbconvert('--to markdown --stdout notebook3*.ipynb') # no cell execution - output2, _ = self.nbconvert('--to markdown --allow-errors --stdout notebook3*.ipynb') # no cell execution; --allow-errors should have no effect - output3, _ = self.nbconvert('--execute --allow-errors --to markdown --stdout notebook3*.ipynb') # with cell execution; errors are allowed + output1, _ = self.nbconvert( + "--to markdown --stdout notebook3*.ipynb" + ) # no cell execution + output2, _ = self.nbconvert( + "--to markdown --allow-errors --stdout notebook3*.ipynb" + ) # no cell execution; --allow-errors should have no effect + output3, _ = self.nbconvert( + "--execute --allow-errors --to markdown --stdout notebook3*.ipynb" + ) # with cell execution; errors are allowed # Un-executed outputs should not contain either # of the two numbers computed in the notebook. - assert '23' not in output1 - assert '42' not in output1 - assert '23' not in output2 - assert '42' not in output2 + assert "23" not in output1 + assert "42" not in output1 + assert "23" not in output2 + assert "42" not in output2 # Executed output should contain both numbers. - assert '23' in output3 - assert '42' in output3 + assert "23" in output3 + assert "42" in output3 # Executing the notebook should raise an exception if --allow-errors is not specified with pytest.raises(OSError): - self.nbconvert('--execute --to markdown --stdout notebook3*.ipynb') + self.nbconvert("--execute --to markdown --stdout notebook3*.ipynb") def test_errors_print_traceback(self): """ Verify that the stderr output contains the traceback of the cell execution exception. """ - with self.create_temp_cwd(['notebook3_with_errors.ipynb']): - _, error_output = self.nbconvert('--execute --to markdown --stdout notebook3_with_errors.ipynb', - ignore_return_code=True) + with self.create_temp_cwd(["notebook3_with_errors.ipynb"]): + _, error_output = self.nbconvert( + "--execute --to markdown --stdout notebook3_with_errors.ipynb", + ignore_return_code=True, + ) assert 'print("Some text before the error")' in error_output assert 'raise RuntimeError("This is a deliberate exception")' in error_output - assert 'RuntimeError: This is a deliberate exception' in error_output + assert "RuntimeError: This is a deliberate exception" in error_output def test_fenced_code_blocks_markdown(self): """ @@ -446,14 +451,14 @@ with self.create_temp_cwd(["notebook1*.ipynb"]): # this notebook doesn't have nb.metadata.kernelspec, so it should # just do a fenced code block, with no language - output1, _ = self.nbconvert('--to markdown --stdout notebook1.ipynb') - assert '```python' not in output1 # shouldn't have language + output1, _ = self.nbconvert("--to markdown --stdout notebook1.ipynb") + assert "```python" not in output1 # shouldn't have language assert "```" in output1 # but should have fenced blocks with self.create_temp_cwd(["notebook_jl*.ipynb"]): - output2, _ = self.nbconvert('--to markdown --stdout notebook_jl.ipynb') - assert '```julia' in output2 # shouldn't have language + output2, _ = self.nbconvert("--to markdown --stdout notebook_jl.ipynb") + assert "```julia" in output2 # shouldn't have language assert "```" in output2 # but should also plain ``` to close cell def test_convert_from_stdin_to_stdout(self): @@ -461,125 +466,128 @@ Verify that conversion can be done via stdin to stdout """ with self.create_temp_cwd(["notebook1.ipynb"]): - with io.open('notebook1.ipynb') as f: + with open("notebook1.ipynb") as f: notebook = f.read().encode() - output1, _ = self.nbconvert('--to markdown --stdin --stdout', stdin=notebook) - assert '```python' not in output1 # shouldn't have language - assert "```" in output1 # but should have fenced blocks + output1, _ = self.nbconvert("--to markdown --stdin --stdout", stdin=notebook) + assert "```python" not in output1 # shouldn't have language + assert "```" in output1 # but should have fenced blocks def test_convert_from_stdin(self): """ Verify that conversion can be done via stdin. """ with self.create_temp_cwd(["notebook1.ipynb"]): - with io.open('notebook1.ipynb') as f: + with open("notebook1.ipynb") as f: notebook = f.read().encode() - self.nbconvert('--to markdown --stdin', stdin=notebook) - assert os.path.isfile("notebook.md") # default name for stdin input - with io.open('notebook.md', 'r', encoding="utf8") as f: + self.nbconvert("--to markdown --stdin", stdin=notebook) + assert os.path.isfile("notebook.md") # default name for stdin input + with open("notebook.md", encoding="utf8") as f: output1 = f.read() - assert '```python' not in output1 # shouldn't have language - assert "```" in output1 # but should have fenced blocks + assert "```python" not in output1 # shouldn't have language + assert "```" in output1 # but should have fenced blocks - @onlyif_cmds_exist('pandoc', 'xelatex') + @onlyif_cmds_exist("pandoc", "xelatex") def test_linked_images(self): """ Generate PDFs with an image linked in a markdown cell """ - with self.create_temp_cwd(['latex-linked-image.ipynb', 'testimage.png']): - self.nbconvert('--to pdf latex-linked-image.ipynb') - assert os.path.isfile('latex-linked-image.pdf') + with self.create_temp_cwd(["latex-linked-image.ipynb", "testimage.png"]): + self.nbconvert("--to pdf latex-linked-image.ipynb") + assert os.path.isfile("latex-linked-image.pdf") - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_embedded_jpeg(self): """ Verify that latex conversion succeeds with a notebook with an embedded .jpeg """ - with self.create_temp_cwd(['notebook4_jpeg.ipynb', - 'containerized_deployments.jpeg']): - self.nbconvert('--to latex notebook4_jpeg.ipynb') - assert os.path.isfile('notebook4_jpeg.tex') + with self.create_temp_cwd(["notebook4_jpeg.ipynb", "containerized_deployments.jpeg"]): + self.nbconvert("--to latex notebook4_jpeg.ipynb") + assert os.path.isfile("notebook4_jpeg.tex") - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_markdown_display_priority(self): """ Check to see if markdown conversion embeds PNGs, even if an (unsupported) PDF is present. """ - with self.create_temp_cwd(['markdown_display_priority.ipynb']): - self.nbconvert('--log-level 0 --to markdown ' - '"markdown_display_priority.ipynb"') - assert os.path.isfile('markdown_display_priority.md') - with open('markdown_display_priority.md', 'r', encoding="utf8") as f: + with self.create_temp_cwd(["markdown_display_priority.ipynb"]): + self.nbconvert('--log-level 0 --to markdown "markdown_display_priority.ipynb"') + assert os.path.isfile("markdown_display_priority.md") + with open("markdown_display_priority.md", encoding="utf8") as f: markdown_output = f.read() - assert ("markdown_display_priority_files/" - "markdown_display_priority_0_1.png") in markdown_output + assert ( + "markdown_display_priority_files/markdown_display_priority_0_1.png" + ) in markdown_output - @onlyif_cmds_exist('pandoc') + @onlyif_cmds_exist("pandoc") def test_write_figures_to_custom_path(self): """ Check if figure files are copied to configured path. """ def fig_exists(path): - return (len(os.listdir(path)) > 0) + return len(os.listdir(path)) > 0 # check absolute path - with self.create_temp_cwd(['notebook4_jpeg.ipynb', - 'containerized_deployments.jpeg']): + with self.create_temp_cwd(["notebook4_jpeg.ipynb", "containerized_deployments.jpeg"]): output_dir = TemporaryDirectory() - path = os.path.join(output_dir.name, 'files') + path = os.path.join(output_dir.name, "files") self.nbconvert( - '--log-level 0 notebook4_jpeg.ipynb --to rst ' - '--NbConvertApp.output_files_dir={}' - .format(path)) + "--log-level 0 notebook4_jpeg.ipynb --to rst " + "--NbConvertApp.output_files_dir={}".format(path) + ) assert fig_exists(path) output_dir.cleanup() # check relative path - with self.create_temp_cwd(['notebook4_jpeg.ipynb', - 'containerized_deployments.jpeg']): + with self.create_temp_cwd(["notebook4_jpeg.ipynb", "containerized_deployments.jpeg"]): self.nbconvert( - '--log-level 0 notebook4_jpeg.ipynb --to rst ' - '--NbConvertApp.output_files_dir=output') - assert fig_exists('output') + "--log-level 0 notebook4_jpeg.ipynb --to rst " + "--NbConvertApp.output_files_dir=output" + ) + assert fig_exists("output") # check default path with notebook name - with self.create_temp_cwd(['notebook4_jpeg.ipynb', - 'containerized_deployments.jpeg']): - self.nbconvert( - '--log-level 0 notebook4_jpeg.ipynb --to rst') - assert fig_exists('notebook4_jpeg_files') + with self.create_temp_cwd(["notebook4_jpeg.ipynb", "containerized_deployments.jpeg"]): + self.nbconvert("--log-level 0 notebook4_jpeg.ipynb --to rst") + assert fig_exists("notebook4_jpeg_files") def test_widgets_from_nbconvert(self): """Check jupyter widgets URL""" with self.create_temp_cwd(["Widget_List.ipynb"]): - self.nbconvert('Widget_List.ipynb --log-level 0 --to html') - assert os.path.isfile('Widget_List.html') - with open("Widget_List.html", 'r', encoding="utf8") as f: + self.nbconvert("Widget_List.ipynb --log-level 0 --to html") + assert os.path.isfile("Widget_List.html") + with open("Widget_List.html", encoding="utf8") as f: text = f.read() - assert "var widgetRendererSrc = 'https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js';" in text + assert ( + "var widgetRendererSrc = 'https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js';" + in text + ) def test_widgets_from_htmlexporter(self): """Check jupyter widgets URL""" with self.create_temp_cwd(["Widget_List.ipynb"]) as tmpdir: - with open(os.path.join(tmpdir, 'Widget_List.ipynb')) as f: + with open(os.path.join(tmpdir, "Widget_List.ipynb")) as f: nb = nbformat.read(f, 4) output, _ = HTMLExporter().from_notebook_node(nb) - assert "var widgetRendererSrc = 'https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js';" in output + assert ( + "var widgetRendererSrc = 'https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js';" + in output + ) def test_not_embedding_images_htmlexporter(self): """Check that the HTMLExporter does not embed images by default""" - with self.create_temp_cwd(["notebook5_embed_images.ipynb", - "containerized_deployments.jpeg"]): - self.nbconvert('notebook5_embed_images --log-level 0 --to html') - assert os.path.isfile('notebook5_embed_images.html') - with open("notebook5_embed_images.html", 'r', encoding="utf8") as f: + with self.create_temp_cwd( + ["notebook5_embed_images.ipynb", "containerized_deployments.jpeg"] + ): + self.nbconvert("notebook5_embed_images --log-level 0 --to html") + assert os.path.isfile("notebook5_embed_images.html") + with open("notebook5_embed_images.html", encoding="utf8") as f: text = f.read() assert "./containerized_deployments.jpeg" in text assert "src='./containerized_deployments.jpeg'" in text @@ -588,11 +596,12 @@ def test_embedding_images_htmlexporter(self): """Check that the HTMLExporter embeds images if needed""" - with self.create_temp_cwd(["notebook5_embed_images.ipynb", - "containerized_deployments.jpeg"]): - self.nbconvert('notebook5_embed_images --log-level 0 --to html --embed-images') - assert os.path.isfile('notebook5_embed_images.html') - with open("notebook5_embed_images.html", 'r', encoding="utf8") as f: + with self.create_temp_cwd( + ["notebook5_embed_images.ipynb", "containerized_deployments.jpeg"] + ): + self.nbconvert("notebook5_embed_images --log-level 0 --to html --embed-images") + assert os.path.isfile("notebook5_embed_images.html") + with open("notebook5_embed_images.html", encoding="utf8") as f: text = f.read() assert "./containerized_deployments.jpeg" not in text assert "src='./containerized_deployments.jpeg'" not in text @@ -602,10 +611,9 @@ """Check jupyter widgets render""" notebookName = "Unexecuted_widget" with self.create_temp_cwd([f"{notebookName}.ipynb"]): - self.nbconvert( - f"{notebookName}.ipynb --execute --log-level 0 --to html") + self.nbconvert(f"{notebookName}.ipynb --execute --log-level 0 --to html") assert os.path.isfile(f"{notebookName}.html") - with open(f"{notebookName}.html", "r", encoding="utf8") as f: + with open(f"{notebookName}.html", encoding="utf8") as f: text = f.read() assert ' +{%- endif %}
{%- endblock -%} -{%- block data_widget_state scoped %} -{% set div_id = uuid4() %} -{% set datatype_list = output.data | filter_data_type %} -{% set datatype = datatype_list[0]%} -
- - -
-{%- endblock data_widget_state -%} - {%- block data_widget_view scoped %} +{%- if not resources.should_sanitize_html %} {% set div_id = uuid4() %} -{% set datatype_list = output.data | filter_data_type %} -{% set datatype = datatype_list[0]%} +{% set datatype_list = output.data | filter_data_type %} +{% set datatype = datatype_list[0]%}
+{%- endif %} {%- endblock data_widget_view -%} {%- block footer %} -{% set mimetype = 'application/vnd.jupyter.widget-state+json'%} +{%- if not resources.should_sanitize_html %} +{% set mimetype = 'application/vnd.jupyter.widget-state+json'%} {% if mimetype in nb.metadata.get("widgets",{})%} {% endif %} +{%- endif %} {{ super() }} {%- endblock footer-%} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/classic/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/classic/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/classic/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/classic/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,13 +1,13 @@ { - "base_template": "base", - "mimetypes": { - "text/html": true - }, - "preprocessors": { - "100-pygments": { - "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor", - "enabled": true, - "style": "default" - } + "base_template": "base", + "mimetypes": { + "text/html": true + }, + "preprocessors": { + "100-pygments": { + "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor", + "enabled": true, + "style": "default" } + } } diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/classic/index.html.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/classic/index.html.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/classic/index.html.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/classic/index.html.j2 2022-08-11 11:50:51.000000000 +0000 @@ -9,7 +9,7 @@ {%- block html_head -%} -{% set nb_title = nb.metadata.get('title', '') or resources['metadata']['name'] %} +{% set nb_title = nb.metadata.get('title', resources['metadata']['name']) | escape_html_keep_quotes %} {{nb_title}} {%- block html_head_js -%} @@ -102,4 +102,3 @@ {{ super() }} {% endblock footer %} - diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/classic/static/style.css nbconvert-6.5.3/share/jupyter/nbconvert/templates/classic/static/style.css --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/classic/static/style.css 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/classic/static/style.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,12935 +0,0 @@ -/*! -* -* Twitter Bootstrap -* -*/ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ -html { - font-family: sans-serif; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; -} -body { - margin: 0; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden], -template { - display: none; -} -a { - background-color: transparent; -} -a:active, -a:hover { - outline: 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -h1 { - font-size: 2em; - margin: 0.67em 0; -} -mark { - background: #ff0; - color: #000; -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -img { - border: 0; -} -svg:not(:root) { - overflow: hidden; -} -figure { - margin: 1em 40px; -} -hr { - box-sizing: content-box; - height: 0; -} -pre { - overflow: auto; -} -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} -button, -input, -optgroup, -select, -textarea { - color: inherit; - font: inherit; - margin: 0; -} -button { - overflow: visible; -} -button, -select { - text-transform: none; -} -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; -} -button[disabled], -html input[disabled] { - cursor: default; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} -input { - line-height: normal; -} -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - padding: 0; -} -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} -input[type="search"] { - -webkit-appearance: textfield; - box-sizing: content-box; -} -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} -legend { - border: 0; - padding: 0; -} -textarea { - overflow: auto; -} -optgroup { - font-weight: bold; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -td, -th { - padding: 0; -} -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ -@media print { - *, - *:before, - *:after { - background: transparent !important; - box-shadow: none !important; - text-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - a[href^="#"]:after, - a[href^="javascript:"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - .navbar { - display: none; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table td, - .table th { - background-color: #fff !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } -} -@font-face { - font-family: 'Glyphicons Halflings'; - src: url('../components/bootstrap/fonts/glyphicons-halflings-regular.eot'); - src: url('../components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} -.glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.glyphicon-asterisk:before { - content: "\002a"; -} -.glyphicon-plus:before { - content: "\002b"; -} -.glyphicon-euro:before, -.glyphicon-eur:before { - content: "\20ac"; -} -.glyphicon-minus:before { - content: "\2212"; -} -.glyphicon-cloud:before { - content: "\2601"; -} -.glyphicon-envelope:before { - content: "\2709"; -} -.glyphicon-pencil:before { - content: "\270f"; -} -.glyphicon-glass:before { - content: "\e001"; -} -.glyphicon-music:before { - content: "\e002"; -} -.glyphicon-search:before { - content: "\e003"; -} -.glyphicon-heart:before { - content: "\e005"; -} -.glyphicon-star:before { - content: "\e006"; -} -.glyphicon-star-empty:before { - content: "\e007"; -} -.glyphicon-user:before { - content: "\e008"; -} -.glyphicon-film:before { - content: "\e009"; -} -.glyphicon-th-large:before { - content: "\e010"; -} -.glyphicon-th:before { - content: "\e011"; -} -.glyphicon-th-list:before { - content: "\e012"; -} -.glyphicon-ok:before { - content: "\e013"; -} -.glyphicon-remove:before { - content: "\e014"; -} -.glyphicon-zoom-in:before { - content: "\e015"; -} -.glyphicon-zoom-out:before { - content: "\e016"; -} -.glyphicon-off:before { - content: "\e017"; -} -.glyphicon-signal:before { - content: "\e018"; -} -.glyphicon-cog:before { - content: "\e019"; -} -.glyphicon-trash:before { - content: "\e020"; -} -.glyphicon-home:before { - content: "\e021"; -} -.glyphicon-file:before { - content: "\e022"; -} -.glyphicon-time:before { - content: "\e023"; -} -.glyphicon-road:before { - content: "\e024"; -} -.glyphicon-download-alt:before { - content: "\e025"; -} -.glyphicon-download:before { - content: "\e026"; -} -.glyphicon-upload:before { - content: "\e027"; -} -.glyphicon-inbox:before { - content: "\e028"; -} -.glyphicon-play-circle:before { - content: "\e029"; -} -.glyphicon-repeat:before { - content: "\e030"; -} -.glyphicon-refresh:before { - content: "\e031"; -} -.glyphicon-list-alt:before { - content: "\e032"; -} -.glyphicon-lock:before { - content: "\e033"; -} -.glyphicon-flag:before { - content: "\e034"; -} -.glyphicon-headphones:before { - content: "\e035"; -} -.glyphicon-volume-off:before { - content: "\e036"; -} -.glyphicon-volume-down:before { - content: "\e037"; -} -.glyphicon-volume-up:before { - content: "\e038"; -} -.glyphicon-qrcode:before { - content: "\e039"; -} -.glyphicon-barcode:before { - content: "\e040"; -} -.glyphicon-tag:before { - content: "\e041"; -} -.glyphicon-tags:before { - content: "\e042"; -} -.glyphicon-book:before { - content: "\e043"; -} -.glyphicon-bookmark:before { - content: "\e044"; -} -.glyphicon-print:before { - content: "\e045"; -} -.glyphicon-camera:before { - content: "\e046"; -} -.glyphicon-font:before { - content: "\e047"; -} -.glyphicon-bold:before { - content: "\e048"; -} -.glyphicon-italic:before { - content: "\e049"; -} -.glyphicon-text-height:before { - content: "\e050"; -} -.glyphicon-text-width:before { - content: "\e051"; -} -.glyphicon-align-left:before { - content: "\e052"; -} -.glyphicon-align-center:before { - content: "\e053"; -} -.glyphicon-align-right:before { - content: "\e054"; -} -.glyphicon-align-justify:before { - content: "\e055"; -} -.glyphicon-list:before { - content: "\e056"; -} -.glyphicon-indent-left:before { - content: "\e057"; -} -.glyphicon-indent-right:before { - content: "\e058"; -} -.glyphicon-facetime-video:before { - content: "\e059"; -} -.glyphicon-picture:before { - content: "\e060"; -} -.glyphicon-map-marker:before { - content: "\e062"; -} -.glyphicon-adjust:before { - content: "\e063"; -} -.glyphicon-tint:before { - content: "\e064"; -} -.glyphicon-edit:before { - content: "\e065"; -} -.glyphicon-share:before { - content: "\e066"; -} -.glyphicon-check:before { - content: "\e067"; -} -.glyphicon-move:before { - content: "\e068"; -} -.glyphicon-step-backward:before { - content: "\e069"; -} -.glyphicon-fast-backward:before { - content: "\e070"; -} -.glyphicon-backward:before { - content: "\e071"; -} -.glyphicon-play:before { - content: "\e072"; -} -.glyphicon-pause:before { - content: "\e073"; -} -.glyphicon-stop:before { - content: "\e074"; -} -.glyphicon-forward:before { - content: "\e075"; -} -.glyphicon-fast-forward:before { - content: "\e076"; -} -.glyphicon-step-forward:before { - content: "\e077"; -} -.glyphicon-eject:before { - content: "\e078"; -} -.glyphicon-chevron-left:before { - content: "\e079"; -} -.glyphicon-chevron-right:before { - content: "\e080"; -} -.glyphicon-plus-sign:before { - content: "\e081"; -} -.glyphicon-minus-sign:before { - content: "\e082"; -} -.glyphicon-remove-sign:before { - content: "\e083"; -} -.glyphicon-ok-sign:before { - content: "\e084"; -} -.glyphicon-question-sign:before { - content: "\e085"; -} -.glyphicon-info-sign:before { - content: "\e086"; -} -.glyphicon-screenshot:before { - content: "\e087"; -} -.glyphicon-remove-circle:before { - content: "\e088"; -} -.glyphicon-ok-circle:before { - content: "\e089"; -} -.glyphicon-ban-circle:before { - content: "\e090"; -} -.glyphicon-arrow-left:before { - content: "\e091"; -} -.glyphicon-arrow-right:before { - content: "\e092"; -} -.glyphicon-arrow-up:before { - content: "\e093"; -} -.glyphicon-arrow-down:before { - content: "\e094"; -} -.glyphicon-share-alt:before { - content: "\e095"; -} -.glyphicon-resize-full:before { - content: "\e096"; -} -.glyphicon-resize-small:before { - content: "\e097"; -} -.glyphicon-exclamation-sign:before { - content: "\e101"; -} -.glyphicon-gift:before { - content: "\e102"; -} -.glyphicon-leaf:before { - content: "\e103"; -} -.glyphicon-fire:before { - content: "\e104"; -} -.glyphicon-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.glyphicon-calendar:before { - content: "\e109"; -} -.glyphicon-random:before { - content: "\e110"; -} -.glyphicon-comment:before { - content: "\e111"; -} -.glyphicon-magnet:before { - content: "\e112"; -} -.glyphicon-chevron-up:before { - content: "\e113"; -} -.glyphicon-chevron-down:before { - content: "\e114"; -} -.glyphicon-retweet:before { - content: "\e115"; -} -.glyphicon-shopping-cart:before { - content: "\e116"; -} -.glyphicon-folder-close:before { - content: "\e117"; -} -.glyphicon-folder-open:before { - content: "\e118"; -} -.glyphicon-resize-vertical:before { - content: "\e119"; -} -.glyphicon-resize-horizontal:before { - content: "\e120"; -} -.glyphicon-hdd:before { - content: "\e121"; -} -.glyphicon-bullhorn:before { - content: "\e122"; -} -.glyphicon-bell:before { - content: "\e123"; -} -.glyphicon-certificate:before { - content: "\e124"; -} -.glyphicon-thumbs-up:before { - content: "\e125"; -} -.glyphicon-thumbs-down:before { - content: "\e126"; -} -.glyphicon-hand-right:before { - content: "\e127"; -} -.glyphicon-hand-left:before { - content: "\e128"; -} -.glyphicon-hand-up:before { - content: "\e129"; -} -.glyphicon-hand-down:before { - content: "\e130"; -} -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} -.glyphicon-globe:before { - content: "\e135"; -} -.glyphicon-wrench:before { - content: "\e136"; -} -.glyphicon-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-briefcase:before { - content: "\e139"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-paperclip:before { - content: "\e142"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.glyphicon-pushpin:before { - content: "\e146"; -} -.glyphicon-usd:before { - content: "\e148"; -} -.glyphicon-gbp:before { - content: "\e149"; -} -.glyphicon-sort:before { - content: "\e150"; -} -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} -.glyphicon-sort-by-order:before { - content: "\e153"; -} -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} -.glyphicon-unchecked:before { - content: "\e157"; -} -.glyphicon-expand:before { - content: "\e158"; -} -.glyphicon-collapse-down:before { - content: "\e159"; -} -.glyphicon-collapse-up:before { - content: "\e160"; -} -.glyphicon-log-in:before { - content: "\e161"; -} -.glyphicon-flash:before { - content: "\e162"; -} -.glyphicon-log-out:before { - content: "\e163"; -} -.glyphicon-new-window:before { - content: "\e164"; -} -.glyphicon-record:before { - content: "\e165"; -} -.glyphicon-save:before { - content: "\e166"; -} -.glyphicon-open:before { - content: "\e167"; -} -.glyphicon-saved:before { - content: "\e168"; -} -.glyphicon-import:before { - content: "\e169"; -} -.glyphicon-export:before { - content: "\e170"; -} -.glyphicon-send:before { - content: "\e171"; -} -.glyphicon-floppy-disk:before { - content: "\e172"; -} -.glyphicon-floppy-saved:before { - content: "\e173"; -} -.glyphicon-floppy-remove:before { - content: "\e174"; -} -.glyphicon-floppy-save:before { - content: "\e175"; -} -.glyphicon-floppy-open:before { - content: "\e176"; -} -.glyphicon-credit-card:before { - content: "\e177"; -} -.glyphicon-transfer:before { - content: "\e178"; -} -.glyphicon-cutlery:before { - content: "\e179"; -} -.glyphicon-header:before { - content: "\e180"; -} -.glyphicon-compressed:before { - content: "\e181"; -} -.glyphicon-earphone:before { - content: "\e182"; -} -.glyphicon-phone-alt:before { - content: "\e183"; -} -.glyphicon-tower:before { - content: "\e184"; -} -.glyphicon-stats:before { - content: "\e185"; -} -.glyphicon-sd-video:before { - content: "\e186"; -} -.glyphicon-hd-video:before { - content: "\e187"; -} -.glyphicon-subtitles:before { - content: "\e188"; -} -.glyphicon-sound-stereo:before { - content: "\e189"; -} -.glyphicon-sound-dolby:before { - content: "\e190"; -} -.glyphicon-sound-5-1:before { - content: "\e191"; -} -.glyphicon-sound-6-1:before { - content: "\e192"; -} -.glyphicon-sound-7-1:before { - content: "\e193"; -} -.glyphicon-copyright-mark:before { - content: "\e194"; -} -.glyphicon-registration-mark:before { - content: "\e195"; -} -.glyphicon-cloud-download:before { - content: "\e197"; -} -.glyphicon-cloud-upload:before { - content: "\e198"; -} -.glyphicon-tree-conifer:before { - content: "\e199"; -} -.glyphicon-tree-deciduous:before { - content: "\e200"; -} -.glyphicon-cd:before { - content: "\e201"; -} -.glyphicon-save-file:before { - content: "\e202"; -} -.glyphicon-open-file:before { - content: "\e203"; -} -.glyphicon-level-up:before { - content: "\e204"; -} -.glyphicon-copy:before { - content: "\e205"; -} -.glyphicon-paste:before { - content: "\e206"; -} -.glyphicon-alert:before { - content: "\e209"; -} -.glyphicon-equalizer:before { - content: "\e210"; -} -.glyphicon-king:before { - content: "\e211"; -} -.glyphicon-queen:before { - content: "\e212"; -} -.glyphicon-pawn:before { - content: "\e213"; -} -.glyphicon-bishop:before { - content: "\e214"; -} -.glyphicon-knight:before { - content: "\e215"; -} -.glyphicon-baby-formula:before { - content: "\e216"; -} -.glyphicon-tent:before { - content: "\26fa"; -} -.glyphicon-blackboard:before { - content: "\e218"; -} -.glyphicon-bed:before { - content: "\e219"; -} -.glyphicon-apple:before { - content: "\f8ff"; -} -.glyphicon-erase:before { - content: "\e221"; -} -.glyphicon-hourglass:before { - content: "\231b"; -} -.glyphicon-lamp:before { - content: "\e223"; -} -.glyphicon-duplicate:before { - content: "\e224"; -} -.glyphicon-piggy-bank:before { - content: "\e225"; -} -.glyphicon-scissors:before { - content: "\e226"; -} -.glyphicon-bitcoin:before { - content: "\e227"; -} -.glyphicon-btc:before { - content: "\e227"; -} -.glyphicon-xbt:before { - content: "\e227"; -} -.glyphicon-yen:before { - content: "\00a5"; -} -.glyphicon-jpy:before { - content: "\00a5"; -} -.glyphicon-ruble:before { - content: "\20bd"; -} -.glyphicon-rub:before { - content: "\20bd"; -} -.glyphicon-scale:before { - content: "\e230"; -} -.glyphicon-ice-lolly:before { - content: "\e231"; -} -.glyphicon-ice-lolly-tasted:before { - content: "\e232"; -} -.glyphicon-education:before { - content: "\e233"; -} -.glyphicon-option-horizontal:before { - content: "\e234"; -} -.glyphicon-option-vertical:before { - content: "\e235"; -} -.glyphicon-menu-hamburger:before { - content: "\e236"; -} -.glyphicon-modal-window:before { - content: "\e237"; -} -.glyphicon-oil:before { - content: "\e238"; -} -.glyphicon-grain:before { - content: "\e239"; -} -.glyphicon-sunglasses:before { - content: "\e240"; -} -.glyphicon-text-size:before { - content: "\e241"; -} -.glyphicon-text-color:before { - content: "\e242"; -} -.glyphicon-text-background:before { - content: "\e243"; -} -.glyphicon-object-align-top:before { - content: "\e244"; -} -.glyphicon-object-align-bottom:before { - content: "\e245"; -} -.glyphicon-object-align-horizontal:before { - content: "\e246"; -} -.glyphicon-object-align-left:before { - content: "\e247"; -} -.glyphicon-object-align-vertical:before { - content: "\e248"; -} -.glyphicon-object-align-right:before { - content: "\e249"; -} -.glyphicon-triangle-right:before { - content: "\e250"; -} -.glyphicon-triangle-left:before { - content: "\e251"; -} -.glyphicon-triangle-bottom:before { - content: "\e252"; -} -.glyphicon-triangle-top:before { - content: "\e253"; -} -.glyphicon-console:before { - content: "\e254"; -} -.glyphicon-superscript:before { - content: "\e255"; -} -.glyphicon-subscript:before { - content: "\e256"; -} -.glyphicon-menu-left:before { - content: "\e257"; -} -.glyphicon-menu-right:before { - content: "\e258"; -} -.glyphicon-menu-down:before { - content: "\e259"; -} -.glyphicon-menu-up:before { - content: "\e260"; -} -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-size: 10px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - line-height: 1.42857143; - color: #000; - background-color: #fff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -a { - color: #337ab7; - text-decoration: none; -} -a:hover, -a:focus { - color: #23527c; - text-decoration: underline; -} -a:focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -figure { - margin: 0; -} -img { - vertical-align: middle; -} -.img-responsive, -.thumbnail > img, -.thumbnail a > img, -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 3px; -} -.img-thumbnail { - padding: 4px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 2px; - -webkit-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - display: inline-block; - max-width: 100%; - height: auto; -} -.img-circle { - border-radius: 50%; -} -hr { - margin-top: 18px; - margin-bottom: 18px; - border: 0; - border-top: 1px solid #eeeeee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -[role="button"] { - cursor: pointer; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #777777; -} -h1, -.h1, -h2, -.h2, -h3, -.h3 { - margin-top: 18px; - margin-bottom: 9px; -} -h1 small, -.h1 small, -h2 small, -.h2 small, -h3 small, -.h3 small, -h1 .small, -.h1 .small, -h2 .small, -.h2 .small, -h3 .small, -.h3 .small { - font-size: 65%; -} -h4, -.h4, -h5, -.h5, -h6, -.h6 { - margin-top: 9px; - margin-bottom: 9px; -} -h4 small, -.h4 small, -h5 small, -.h5 small, -h6 small, -.h6 small, -h4 .small, -.h4 .small, -h5 .small, -.h5 .small, -h6 .small, -.h6 .small { - font-size: 75%; -} -h1, -.h1 { - font-size: 33px; -} -h2, -.h2 { - font-size: 27px; -} -h3, -.h3 { - font-size: 23px; -} -h4, -.h4 { - font-size: 17px; -} -h5, -.h5 { - font-size: 13px; -} -h6, -.h6 { - font-size: 12px; -} -p { - margin: 0 0 9px; -} -.lead { - margin-bottom: 18px; - font-size: 14px; - font-weight: 300; - line-height: 1.4; -} -@media (min-width: 768px) { - .lead { - font-size: 19.5px; - } -} -small, -.small { - font-size: 92%; -} -mark, -.mark { - background-color: #fcf8e3; - padding: .2em; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.text-justify { - text-align: justify; -} -.text-nowrap { - white-space: nowrap; -} -.text-lowercase { - text-transform: lowercase; -} -.text-uppercase { - text-transform: uppercase; -} -.text-capitalize { - text-transform: capitalize; -} -.text-muted { - color: #777777; -} -.text-primary { - color: #337ab7; -} -a.text-primary:hover, -a.text-primary:focus { - color: #286090; -} -.text-success { - color: #3c763d; -} -a.text-success:hover, -a.text-success:focus { - color: #2b542c; -} -.text-info { - color: #31708f; -} -a.text-info:hover, -a.text-info:focus { - color: #245269; -} -.text-warning { - color: #8a6d3b; -} -a.text-warning:hover, -a.text-warning:focus { - color: #66512c; -} -.text-danger { - color: #a94442; -} -a.text-danger:hover, -a.text-danger:focus { - color: #843534; -} -.bg-primary { - color: #fff; - background-color: #337ab7; -} -a.bg-primary:hover, -a.bg-primary:focus { - background-color: #286090; -} -.bg-success { - background-color: #dff0d8; -} -a.bg-success:hover, -a.bg-success:focus { - background-color: #c1e2b3; -} -.bg-info { - background-color: #d9edf7; -} -a.bg-info:hover, -a.bg-info:focus { - background-color: #afd9ee; -} -.bg-warning { - background-color: #fcf8e3; -} -a.bg-warning:hover, -a.bg-warning:focus { - background-color: #f7ecb5; -} -.bg-danger { - background-color: #f2dede; -} -a.bg-danger:hover, -a.bg-danger:focus { - background-color: #e4b9b9; -} -.page-header { - padding-bottom: 8px; - margin: 36px 0 18px; - border-bottom: 1px solid #eeeeee; -} -ul, -ol { - margin-top: 0; - margin-bottom: 9px; -} -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} -.list-unstyled { - padding-left: 0; - list-style: none; -} -.list-inline { - padding-left: 0; - list-style: none; - margin-left: -5px; -} -.list-inline > li { - display: inline-block; - padding-left: 5px; - padding-right: 5px; -} -dl { - margin-top: 0; - margin-bottom: 18px; -} -dt, -dd { - line-height: 1.42857143; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 541px) { - .dl-horizontal dt { - float: left; - width: 160px; - clear: left; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #777777; -} -.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 9px 18px; - margin: 0 0 18px; - font-size: inherit; - border-left: 5px solid #eeeeee; -} -blockquote p:last-child, -blockquote ul:last-child, -blockquote ol:last-child { - margin-bottom: 0; -} -blockquote footer, -blockquote small, -blockquote .small { - display: block; - font-size: 80%; - line-height: 1.42857143; - color: #777777; -} -blockquote footer:before, -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} -.blockquote-reverse, -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; - text-align: right; -} -.blockquote-reverse footer:before, -blockquote.pull-right footer:before, -.blockquote-reverse small:before, -blockquote.pull-right small:before, -.blockquote-reverse .small:before, -blockquote.pull-right .small:before { - content: ''; -} -.blockquote-reverse footer:after, -blockquote.pull-right footer:after, -.blockquote-reverse small:after, -blockquote.pull-right small:after, -.blockquote-reverse .small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} -address { - margin-bottom: 18px; - font-style: normal; - line-height: 1.42857143; -} -code, -kbd, -pre, -samp { - font-family: monospace; -} -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - background-color: #f9f2f4; - border-radius: 2px; -} -kbd { - padding: 2px 4px; - font-size: 90%; - color: #888; - background-color: transparent; - border-radius: 1px; - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); -} -kbd kbd { - padding: 0; - font-size: 100%; - font-weight: bold; - box-shadow: none; -} -pre { - display: block; - padding: 8.5px; - margin: 0 0 9px; - font-size: 12px; - line-height: 1.42857143; - word-break: break-all; - word-wrap: break-word; - color: #333333; - background-color: #f5f5f5; - border: 1px solid #ccc; - border-radius: 2px; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.container { - margin-right: auto; - margin-left: auto; - padding-left: 0px; - padding-right: 0px; -} -@media (min-width: 768px) { - .container { - width: 768px; - } -} -@media (min-width: 992px) { - .container { - width: 940px; - } -} -@media (min-width: 1200px) { - .container { - width: 1140px; - } -} -.container-fluid { - margin-right: auto; - margin-left: auto; - padding-left: 0px; - padding-right: 0px; -} -.row { - margin-left: 0px; - margin-right: 0px; -} -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; - min-height: 1px; - padding-left: 0px; - padding-right: 0px; -} -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: auto; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: auto; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0%; -} -@media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: auto; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: auto; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0%; - } -} -@media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: auto; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0%; - } -} -@media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0%; - } -} -table { - background-color: transparent; -} -caption { - padding-top: 8px; - padding-bottom: 8px; - color: #777777; - text-align: left; -} -th { - text-align: left; -} -.table { - width: 100%; - max-width: 100%; - margin-bottom: 18px; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.42857143; - vertical-align: top; - border-top: 1px solid #ddd; -} -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #ddd; -} -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} -.table > tbody + tbody { - border-top: 2px solid #ddd; -} -.table .table { - background-color: #fff; -} -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} -.table-bordered { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} -.table-striped > tbody > tr:nth-of-type(odd) { - background-color: #f9f9f9; -} -.table-hover > tbody > tr:hover { - background-color: #f5f5f5; -} -table col[class*="col-"] { - position: static; - float: none; - display: table-column; -} -table td[class*="col-"], -table th[class*="col-"] { - position: static; - float: none; - display: table-cell; -} -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} -.table-hover > tbody > tr > td.active:hover, -.table-hover > tbody > tr > th.active:hover, -.table-hover > tbody > tr.active:hover > td, -.table-hover > tbody > tr:hover > .active, -.table-hover > tbody > tr.active:hover > th { - background-color: #e8e8e8; -} -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td, -.table-hover > tbody > tr:hover > .success, -.table-hover > tbody > tr.success:hover > th { - background-color: #d0e9c6; -} -.table > thead > tr > td.info, -.table > tbody > tr > td.info, -.table > tfoot > tr > td.info, -.table > thead > tr > th.info, -.table > tbody > tr > th.info, -.table > tfoot > tr > th.info, -.table > thead > tr.info > td, -.table > tbody > tr.info > td, -.table > tfoot > tr.info > td, -.table > thead > tr.info > th, -.table > tbody > tr.info > th, -.table > tfoot > tr.info > th { - background-color: #d9edf7; -} -.table-hover > tbody > tr > td.info:hover, -.table-hover > tbody > tr > th.info:hover, -.table-hover > tbody > tr.info:hover > td, -.table-hover > tbody > tr:hover > .info, -.table-hover > tbody > tr.info:hover > th { - background-color: #c4e3f3; -} -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td, -.table-hover > tbody > tr:hover > .warning, -.table-hover > tbody > tr.warning:hover > th { - background-color: #faf2cc; -} -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td, -.table-hover > tbody > tr:hover > .danger, -.table-hover > tbody > tr.danger:hover > th { - background-color: #ebcccc; -} -.table-responsive { - overflow-x: auto; - min-height: 0.01%; -} -@media screen and (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 13.5px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid #ddd; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} -fieldset { - padding: 0; - margin: 0; - border: 0; - min-width: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 18px; - font-size: 19.5px; - line-height: inherit; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -label { - display: inline-block; - max-width: 100%; - margin-bottom: 5px; - font-weight: bold; -} -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - line-height: normal; -} -input[type="file"] { - display: block; -} -input[type="range"] { - display: block; - width: 100%; -} -select[multiple], -select[size] { - height: auto; -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -output { - display: block; - padding-top: 7px; - font-size: 13px; - line-height: 1.42857143; - color: #555555; -} -.form-control { - display: block; - width: 100%; - height: 32px; - padding: 6px 12px; - font-size: 13px; - line-height: 1.42857143; - color: #555555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -.form-control:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); -} -.form-control::-moz-placeholder { - color: #999; - opacity: 1; -} -.form-control:-ms-input-placeholder { - color: #999; -} -.form-control::-webkit-input-placeholder { - color: #999; -} -.form-control::-ms-expand { - border: 0; - background-color: transparent; -} -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - background-color: #eeeeee; - opacity: 1; -} -.form-control[disabled], -fieldset[disabled] .form-control { - cursor: not-allowed; -} -textarea.form-control { - height: auto; -} -input[type="search"] { - -webkit-appearance: none; -} -@media screen and (-webkit-min-device-pixel-ratio: 0) { - input[type="date"].form-control, - input[type="time"].form-control, - input[type="datetime-local"].form-control, - input[type="month"].form-control { - line-height: 32px; - } - input[type="date"].input-sm, - input[type="time"].input-sm, - input[type="datetime-local"].input-sm, - input[type="month"].input-sm, - .input-group-sm input[type="date"], - .input-group-sm input[type="time"], - .input-group-sm input[type="datetime-local"], - .input-group-sm input[type="month"] { - line-height: 30px; - } - input[type="date"].input-lg, - input[type="time"].input-lg, - input[type="datetime-local"].input-lg, - input[type="month"].input-lg, - .input-group-lg input[type="date"], - .input-group-lg input[type="time"], - .input-group-lg input[type="datetime-local"], - .input-group-lg input[type="month"] { - line-height: 45px; - } -} -.form-group { - margin-bottom: 15px; -} -.radio, -.checkbox { - position: relative; - display: block; - margin-top: 10px; - margin-bottom: 10px; -} -.radio label, -.checkbox label { - min-height: 18px; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - position: absolute; - margin-left: -20px; - margin-top: 4px \9; -} -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} -.radio-inline, -.checkbox-inline { - position: relative; - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - vertical-align: middle; - font-weight: normal; - cursor: pointer; -} -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"].disabled, -input[type="checkbox"].disabled, -fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"] { - cursor: not-allowed; -} -.radio-inline.disabled, -.checkbox-inline.disabled, -fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox-inline { - cursor: not-allowed; -} -.radio.disabled label, -.checkbox.disabled label, -fieldset[disabled] .radio label, -fieldset[disabled] .checkbox label { - cursor: not-allowed; -} -.form-control-static { - padding-top: 7px; - padding-bottom: 7px; - margin-bottom: 0; - min-height: 31px; -} -.form-control-static.input-lg, -.form-control-static.input-sm { - padding-left: 0; - padding-right: 0; -} -.input-sm { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; -} -select.input-sm { - height: 30px; - line-height: 30px; -} -textarea.input-sm, -select[multiple].input-sm { - height: auto; -} -.form-group-sm .form-control { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; -} -.form-group-sm select.form-control { - height: 30px; - line-height: 30px; -} -.form-group-sm textarea.form-control, -.form-group-sm select[multiple].form-control { - height: auto; -} -.form-group-sm .form-control-static { - height: 30px; - min-height: 30px; - padding: 6px 10px; - font-size: 12px; - line-height: 1.5; -} -.input-lg { - height: 45px; - padding: 10px 16px; - font-size: 17px; - line-height: 1.3333333; - border-radius: 3px; -} -select.input-lg { - height: 45px; - line-height: 45px; -} -textarea.input-lg, -select[multiple].input-lg { - height: auto; -} -.form-group-lg .form-control { - height: 45px; - padding: 10px 16px; - font-size: 17px; - line-height: 1.3333333; - border-radius: 3px; -} -.form-group-lg select.form-control { - height: 45px; - line-height: 45px; -} -.form-group-lg textarea.form-control, -.form-group-lg select[multiple].form-control { - height: auto; -} -.form-group-lg .form-control-static { - height: 45px; - min-height: 35px; - padding: 11px 16px; - font-size: 17px; - line-height: 1.3333333; -} -.has-feedback { - position: relative; -} -.has-feedback .form-control { - padding-right: 40px; -} -.form-control-feedback { - position: absolute; - top: 0; - right: 0; - z-index: 2; - display: block; - width: 32px; - height: 32px; - line-height: 32px; - text-align: center; - pointer-events: none; -} -.input-lg + .form-control-feedback, -.input-group-lg + .form-control-feedback, -.form-group-lg .form-control + .form-control-feedback { - width: 45px; - height: 45px; - line-height: 45px; -} -.input-sm + .form-control-feedback, -.input-group-sm + .form-control-feedback, -.form-group-sm .form-control + .form-control-feedback { - width: 30px; - height: 30px; - line-height: 30px; -} -.has-success .help-block, -.has-success .control-label, -.has-success .radio, -.has-success .checkbox, -.has-success .radio-inline, -.has-success .checkbox-inline, -.has-success.radio label, -.has-success.checkbox label, -.has-success.radio-inline label, -.has-success.checkbox-inline label { - color: #3c763d; -} -.has-success .form-control { - border-color: #3c763d; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.has-success .form-control:focus { - border-color: #2b542c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; -} -.has-success .input-group-addon { - color: #3c763d; - border-color: #3c763d; - background-color: #dff0d8; -} -.has-success .form-control-feedback { - color: #3c763d; -} -.has-warning .help-block, -.has-warning .control-label, -.has-warning .radio, -.has-warning .checkbox, -.has-warning .radio-inline, -.has-warning .checkbox-inline, -.has-warning.radio label, -.has-warning.checkbox label, -.has-warning.radio-inline label, -.has-warning.checkbox-inline label { - color: #8a6d3b; -} -.has-warning .form-control { - border-color: #8a6d3b; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.has-warning .form-control:focus { - border-color: #66512c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; -} -.has-warning .input-group-addon { - color: #8a6d3b; - border-color: #8a6d3b; - background-color: #fcf8e3; -} -.has-warning .form-control-feedback { - color: #8a6d3b; -} -.has-error .help-block, -.has-error .control-label, -.has-error .radio, -.has-error .checkbox, -.has-error .radio-inline, -.has-error .checkbox-inline, -.has-error.radio label, -.has-error.checkbox label, -.has-error.radio-inline label, -.has-error.checkbox-inline label { - color: #a94442; -} -.has-error .form-control { - border-color: #a94442; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} -.has-error .form-control:focus { - border-color: #843534; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; -} -.has-error .input-group-addon { - color: #a94442; - border-color: #a94442; - background-color: #f2dede; -} -.has-error .form-control-feedback { - color: #a94442; -} -.has-feedback label ~ .form-control-feedback { - top: 23px; -} -.has-feedback label.sr-only ~ .form-control-feedback { - top: 0; -} -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #404040; -} -@media (min-width: 768px) { - .form-inline .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .form-inline .form-control-static { - display: inline-block; - } - .form-inline .input-group { - display: inline-table; - vertical-align: middle; - } - .form-inline .input-group .input-group-addon, - .form-inline .input-group .input-group-btn, - .form-inline .input-group .form-control { - width: auto; - } - .form-inline .input-group > .form-control { - width: 100%; - } - .form-inline .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio label, - .form-inline .checkbox label { - padding-left: 0; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .form-inline .has-feedback .form-control-feedback { - top: 0; - } -} -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - margin-top: 0; - margin-bottom: 0; - padding-top: 7px; -} -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 25px; -} -.form-horizontal .form-group { - margin-left: 0px; - margin-right: 0px; -} -@media (min-width: 768px) { - .form-horizontal .control-label { - text-align: right; - margin-bottom: 0; - padding-top: 7px; - } -} -.form-horizontal .has-feedback .form-control-feedback { - right: 0px; -} -@media (min-width: 768px) { - .form-horizontal .form-group-lg .control-label { - padding-top: 11px; - font-size: 17px; - } -} -@media (min-width: 768px) { - .form-horizontal .form-group-sm .control-label { - padding-top: 6px; - font-size: 12px; - } -} -.btn { - display: inline-block; - margin-bottom: 0; - font-weight: normal; - text-align: center; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - padding: 6px 12px; - font-size: 13px; - line-height: 1.42857143; - border-radius: 2px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.btn:focus, -.btn:active:focus, -.btn.active:focus, -.btn.focus, -.btn:active.focus, -.btn.active.focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus, -.btn.focus { - color: #333; - text-decoration: none; -} -.btn:active, -.btn.active { - outline: 0; - background-image: none; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - cursor: not-allowed; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; -} -a.btn.disabled, -fieldset[disabled] a.btn { - pointer-events: none; -} -.btn-default { - color: #333; - background-color: #fff; - border-color: #ccc; -} -.btn-default:focus, -.btn-default.focus { - color: #333; - background-color: #e6e6e6; - border-color: #8c8c8c; -} -.btn-default:hover { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active:hover, -.btn-default.active:hover, -.open > .dropdown-toggle.btn-default:hover, -.btn-default:active:focus, -.btn-default.active:focus, -.open > .dropdown-toggle.btn-default:focus, -.btn-default:active.focus, -.btn-default.active.focus, -.open > .dropdown-toggle.btn-default.focus { - color: #333; - background-color: #d4d4d4; - border-color: #8c8c8c; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - background-image: none; -} -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus { - background-color: #fff; - border-color: #ccc; -} -.btn-default .badge { - color: #fff; - background-color: #333; -} -.btn-primary { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary:focus, -.btn-primary.focus { - color: #fff; - background-color: #286090; - border-color: #122b40; -} -.btn-primary:hover { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active:hover, -.btn-primary.active:hover, -.open > .dropdown-toggle.btn-primary:hover, -.btn-primary:active:focus, -.btn-primary.active:focus, -.open > .dropdown-toggle.btn-primary:focus, -.btn-primary:active.focus, -.btn-primary.active.focus, -.open > .dropdown-toggle.btn-primary.focus { - color: #fff; - background-color: #204d74; - border-color: #122b40; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - background-image: none; -} -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus { - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary .badge { - color: #337ab7; - background-color: #fff; -} -.btn-success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:focus, -.btn-success.focus { - color: #fff; - background-color: #449d44; - border-color: #255625; -} -.btn-success:hover { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active:hover, -.btn-success.active:hover, -.open > .dropdown-toggle.btn-success:hover, -.btn-success:active:focus, -.btn-success.active:focus, -.open > .dropdown-toggle.btn-success:focus, -.btn-success:active.focus, -.btn-success.active.focus, -.open > .dropdown-toggle.btn-success.focus { - color: #fff; - background-color: #398439; - border-color: #255625; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - background-image: none; -} -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} -.btn-info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:focus, -.btn-info.focus { - color: #fff; - background-color: #31b0d5; - border-color: #1b6d85; -} -.btn-info:hover { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active:hover, -.btn-info.active:hover, -.open > .dropdown-toggle.btn-info:hover, -.btn-info:active:focus, -.btn-info.active:focus, -.open > .dropdown-toggle.btn-info:focus, -.btn-info:active.focus, -.btn-info.active.focus, -.open > .dropdown-toggle.btn-info.focus { - color: #fff; - background-color: #269abc; - border-color: #1b6d85; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - background-image: none; -} -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} -.btn-warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:focus, -.btn-warning.focus { - color: #fff; - background-color: #ec971f; - border-color: #985f0d; -} -.btn-warning:hover { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active:hover, -.btn-warning.active:hover, -.open > .dropdown-toggle.btn-warning:hover, -.btn-warning:active:focus, -.btn-warning.active:focus, -.open > .dropdown-toggle.btn-warning:focus, -.btn-warning:active.focus, -.btn-warning.active.focus, -.open > .dropdown-toggle.btn-warning.focus { - color: #fff; - background-color: #d58512; - border-color: #985f0d; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - background-image: none; -} -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.btn-danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:focus, -.btn-danger.focus { - color: #fff; - background-color: #c9302c; - border-color: #761c19; -} -.btn-danger:hover { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active:hover, -.btn-danger.active:hover, -.open > .dropdown-toggle.btn-danger:hover, -.btn-danger:active:focus, -.btn-danger.active:focus, -.open > .dropdown-toggle.btn-danger:focus, -.btn-danger:active.focus, -.btn-danger.active.focus, -.open > .dropdown-toggle.btn-danger.focus { - color: #fff; - background-color: #ac2925; - border-color: #761c19; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - background-image: none; -} -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} -.btn-link { - color: #337ab7; - font-weight: normal; - border-radius: 0; -} -.btn-link, -.btn-link:active, -.btn-link.active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} -.btn-link:hover, -.btn-link:focus { - color: #23527c; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #777777; - text-decoration: none; -} -.btn-lg, -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 17px; - line-height: 1.3333333; - border-radius: 3px; -} -.btn-sm, -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; -} -.btn-xs, -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; -} -.btn-block { - display: block; - width: 100%; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - display: none; -} -.collapse.in { - display: block; -} -tr.collapse.in { - display: table-row; -} -tbody.collapse.in { - display: table-row-group; -} -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition-property: height, visibility; - transition-property: height, visibility; - -webkit-transition-duration: 0.35s; - transition-duration: 0.35s; - -webkit-transition-timing-function: ease; - transition-timing-function: ease; -} -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px dashed; - border-top: 4px solid \9; - border-right: 4px solid transparent; - border-left: 4px solid transparent; -} -.dropup, -.dropdown { - position: relative; -} -.dropdown-toggle:focus { - outline: 0; -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - font-size: 13px; - text-align: left; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 2px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - background-clip: padding-box; -} -.dropdown-menu.pull-right { - right: 0; - left: auto; -} -.dropdown-menu .divider { - height: 1px; - margin: 8px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.42857143; - color: #333333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - text-decoration: none; - color: #262626; - background-color: #f5f5f5; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #fff; - text-decoration: none; - outline: 0; - background-color: #337ab7; -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #777777; -} -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - cursor: not-allowed; -} -.open > .dropdown-menu { - display: block; -} -.open > a { - outline: 0; -} -.dropdown-menu-right { - left: auto; - right: 0; -} -.dropdown-menu-left { - left: 0; - right: auto; -} -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.42857143; - color: #777777; - white-space: nowrap; -} -.dropdown-backdrop { - position: fixed; - left: 0; - right: 0; - bottom: 0; - top: 0; - z-index: 990; -} -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px dashed; - border-bottom: 4px solid \9; - content: ""; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 2px; -} -@media (min-width: 541px) { - .navbar-right .dropdown-menu { - left: auto; - right: 0; - } - .navbar-right .dropdown-menu-left { - left: 0; - right: auto; - } -} -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn.active { - z-index: 2; -} -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; -} -.btn-toolbar { - margin-left: -5px; -} -.btn-toolbar .btn, -.btn-toolbar .btn-group, -.btn-toolbar .input-group { - float: left; -} -.btn-toolbar > .btn, -.btn-toolbar > .btn-group, -.btn-toolbar > .input-group { - margin-left: 5px; -} -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} -.btn-group > .btn:first-child { - margin-left: 0; -} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-bottom-right-radius: 0; - border-top-right-radius: 0; -} -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} -.btn-group > .btn-group { - float: left; -} -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-bottom-right-radius: 0; - border-top-right-radius: 0; -} -.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group > .btn + .dropdown-toggle { - padding-left: 8px; - padding-right: 8px; -} -.btn-group > .btn-lg + .dropdown-toggle { - padding-left: 12px; - padding-right: 12px; -} -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} -.btn-group.open .dropdown-toggle.btn-link { - -webkit-box-shadow: none; - box-shadow: none; -} -.btn .caret { - margin-left: 0; -} -.btn-lg .caret { - border-width: 5px 5px 0; - border-bottom-width: 0; -} -.dropup .btn-lg .caret { - border-width: 0 5px 5px; -} -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group, -.btn-group-vertical > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group > .btn { - float: none; -} -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; -} -.btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-right-radius: 2px; - border-top-left-radius: 2px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-right-radius: 0; - border-top-left-radius: 0; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 2px; -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} -.btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; -} -.btn-group-justified > .btn, -.btn-group-justified > .btn-group { - float: none; - display: table-cell; - width: 1%; -} -.btn-group-justified > .btn-group .btn { - width: 100%; -} -.btn-group-justified > .btn-group .dropdown-menu { - left: auto; -} -[data-toggle="buttons"] > .btn input[type="radio"], -[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], -[data-toggle="buttons"] > .btn input[type="checkbox"], -[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; -} -.input-group { - position: relative; - display: table; - border-collapse: separate; -} -.input-group[class*="col-"] { - float: none; - padding-left: 0; - padding-right: 0; -} -.input-group .form-control { - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.input-group .form-control:focus { - z-index: 3; -} -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 45px; - padding: 10px 16px; - font-size: 17px; - line-height: 1.3333333; - border-radius: 3px; -} -select.input-group-lg > .form-control, -select.input-group-lg > .input-group-addon, -select.input-group-lg > .input-group-btn > .btn { - height: 45px; - line-height: 45px; -} -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.input-group-lg > .input-group-btn > .btn, -select[multiple].input-group-lg > .form-control, -select[multiple].input-group-lg > .input-group-addon, -select[multiple].input-group-lg > .input-group-btn > .btn { - height: auto; -} -.input-group-sm > .form-control, -.input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; -} -select.input-group-sm > .form-control, -select.input-group-sm > .input-group-addon, -select.input-group-sm > .input-group-btn > .btn { - height: 30px; - line-height: 30px; -} -textarea.input-group-sm > .form-control, -textarea.input-group-sm > .input-group-addon, -textarea.input-group-sm > .input-group-btn > .btn, -select[multiple].input-group-sm > .form-control, -select[multiple].input-group-sm > .input-group-addon, -select[multiple].input-group-sm > .input-group-btn > .btn { - height: auto; -} -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} -.input-group-addon { - padding: 6px 12px; - font-size: 13px; - font-weight: normal; - line-height: 1; - color: #555555; - text-align: center; - background-color: #eeeeee; - border: 1px solid #ccc; - border-radius: 2px; -} -.input-group-addon.input-sm { - padding: 5px 10px; - font-size: 12px; - border-radius: 1px; -} -.input-group-addon.input-lg { - padding: 10px 16px; - font-size: 17px; - border-radius: 3px; -} -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-bottom-right-radius: 0; - border-top-right-radius: 0; -} -.input-group-addon:first-child { - border-right: 0; -} -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} -.input-group-addon:last-child { - border-left: 0; -} -.input-group-btn { - position: relative; - font-size: 0; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -1px; -} -.input-group-btn > .btn:hover, -.input-group-btn > .btn:focus, -.input-group-btn > .btn:active { - z-index: 2; -} -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group { - margin-right: -1px; -} -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group { - z-index: 2; - margin-left: -1px; -} -.nav { - margin-bottom: 0; - padding-left: 0; - list-style: none; -} -.nav > li { - position: relative; - display: block; -} -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} -.nav > li.disabled > a { - color: #777777; -} -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #777777; - text-decoration: none; - background-color: transparent; - cursor: not-allowed; -} -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eeeeee; - border-color: #337ab7; -} -.nav .nav-divider { - height: 1px; - margin: 8px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.nav > li > a > img { - max-width: none; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.42857143; - border: 1px solid transparent; - border-radius: 2px 2px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #ddd; -} -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555555; - background-color: #fff; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; -} -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} -.nav-tabs.nav-justified > li { - float: none; -} -.nav-tabs.nav-justified > li > a { - text-align: center; - margin-bottom: 5px; -} -.nav-tabs.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-tabs.nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-radius: 2px; -} -.nav-tabs.nav-justified > .active > a, -.nav-tabs.nav-justified > .active > a:hover, -.nav-tabs.nav-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 2px 2px 0 0; - } - .nav-tabs.nav-justified > .active > a, - .nav-tabs.nav-justified > .active > a:hover, - .nav-tabs.nav-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.nav-pills > li { - float: left; -} -.nav-pills > li > a { - border-radius: 2px; -} -.nav-pills > li + li { - margin-left: 2px; -} -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #fff; - background-color: #337ab7; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} -.nav-justified { - width: 100%; -} -.nav-justified > li { - float: none; -} -.nav-justified > li > a { - text-align: center; - margin-bottom: 5px; -} -.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs-justified { - border-bottom: 0; -} -.nav-tabs-justified > li > a { - margin-right: 0; - border-radius: 2px; -} -.nav-tabs-justified > .active > a, -.nav-tabs-justified > .active > a:hover, -.nav-tabs-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 2px 2px 0 0; - } - .nav-tabs-justified > .active > a, - .nav-tabs-justified > .active > a:hover, - .nav-tabs-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.tab-content > .tab-pane { - display: none; -} -.tab-content > .active { - display: block; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-right-radius: 0; - border-top-left-radius: 0; -} -.navbar { - position: relative; - min-height: 30px; - margin-bottom: 18px; - border: 1px solid transparent; -} -@media (min-width: 541px) { - .navbar { - border-radius: 2px; - } -} -@media (min-width: 541px) { - .navbar-header { - float: left; - } -} -.navbar-collapse { - overflow-x: visible; - padding-right: 0px; - padding-left: 0px; - border-top: 1px solid transparent; - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); - -webkit-overflow-scrolling: touch; -} -.navbar-collapse.in { - overflow-y: auto; -} -@media (min-width: 541px) { - .navbar-collapse { - width: auto; - border-top: 0; - box-shadow: none; - } - .navbar-collapse.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; - overflow: visible !important; - } - .navbar-collapse.in { - overflow-y: visible; - } - .navbar-fixed-top .navbar-collapse, - .navbar-static-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - padding-left: 0; - padding-right: 0; - } -} -.navbar-fixed-top .navbar-collapse, -.navbar-fixed-bottom .navbar-collapse { - max-height: 340px; -} -@media (max-device-width: 540px) and (orientation: landscape) { - .navbar-fixed-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - max-height: 200px; - } -} -.container > .navbar-header, -.container-fluid > .navbar-header, -.container > .navbar-collapse, -.container-fluid > .navbar-collapse { - margin-right: 0px; - margin-left: 0px; -} -@media (min-width: 541px) { - .container > .navbar-header, - .container-fluid > .navbar-header, - .container > .navbar-collapse, - .container-fluid > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} -.navbar-static-top { - z-index: 1000; - border-width: 0 0 1px; -} -@media (min-width: 541px) { - .navbar-static-top { - border-radius: 0; - } -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; -} -@media (min-width: 541px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} -.navbar-fixed-top { - top: 0; - border-width: 0 0 1px; -} -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; - border-width: 1px 0 0; -} -.navbar-brand { - float: left; - padding: 6px 0px; - font-size: 17px; - line-height: 18px; - height: 30px; -} -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} -.navbar-brand > img { - display: block; -} -@media (min-width: 541px) { - .navbar > .container .navbar-brand, - .navbar > .container-fluid .navbar-brand { - margin-left: 0px; - } -} -.navbar-toggle { - position: relative; - float: right; - margin-right: 0px; - padding: 9px 10px; - margin-top: -2px; - margin-bottom: -2px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 2px; -} -.navbar-toggle:focus { - outline: 0; -} -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -@media (min-width: 541px) { - .navbar-toggle { - display: none; - } -} -.navbar-nav { - margin: 3px 0px; -} -.navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: 18px; -} -@media (max-width: 540px) { - .navbar-nav .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - box-shadow: none; - } - .navbar-nav .open .dropdown-menu > li > a, - .navbar-nav .open .dropdown-menu .dropdown-header { - padding: 5px 15px 5px 25px; - } - .navbar-nav .open .dropdown-menu > li > a { - line-height: 18px; - } - .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-nav .open .dropdown-menu > li > a:focus { - background-image: none; - } -} -@media (min-width: 541px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 6px; - padding-bottom: 6px; - } -} -.navbar-form { - margin-left: 0px; - margin-right: 0px; - padding: 10px 0px; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); - margin-top: -1px; - margin-bottom: -1px; -} -@media (min-width: 768px) { - .navbar-form .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .navbar-form .form-control-static { - display: inline-block; - } - .navbar-form .input-group { - display: inline-table; - vertical-align: middle; - } - .navbar-form .input-group .input-group-addon, - .navbar-form .input-group .input-group-btn, - .navbar-form .input-group .form-control { - width: auto; - } - .navbar-form .input-group > .form-control { - width: 100%; - } - .navbar-form .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio label, - .navbar-form .checkbox label { - padding-left: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .navbar-form .has-feedback .form-control-feedback { - top: 0; - } -} -@media (max-width: 540px) { - .navbar-form .form-group { - margin-bottom: 5px; - } - .navbar-form .form-group:last-child { - margin-bottom: 0; - } -} -@media (min-width: 541px) { - .navbar-form { - width: auto; - border: 0; - margin-left: 0; - margin-right: 0; - padding-top: 0; - padding-bottom: 0; - -webkit-box-shadow: none; - box-shadow: none; - } -} -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-right-radius: 0; - border-top-left-radius: 0; -} -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - margin-bottom: 0; - border-top-right-radius: 2px; - border-top-left-radius: 2px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.navbar-btn { - margin-top: -1px; - margin-bottom: -1px; -} -.navbar-btn.btn-sm { - margin-top: 0px; - margin-bottom: 0px; -} -.navbar-btn.btn-xs { - margin-top: 4px; - margin-bottom: 4px; -} -.navbar-text { - margin-top: 6px; - margin-bottom: 6px; -} -@media (min-width: 541px) { - .navbar-text { - float: left; - margin-left: 0px; - margin-right: 0px; - } -} -@media (min-width: 541px) { - .navbar-left { - float: left !important; - float: left; - } - .navbar-right { - float: right !important; - float: right; - margin-right: 0px; - } - .navbar-right ~ .navbar-right { - margin-right: 0; - } -} -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777; -} -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} -.navbar-default .navbar-text { - color: #777; -} -.navbar-default .navbar-nav > li > a { - color: #777; -} -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333; - background-color: transparent; -} -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555; - background-color: #e7e7e7; -} -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #ccc; - background-color: transparent; -} -.navbar-default .navbar-toggle { - border-color: #ddd; -} -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #ddd; -} -.navbar-default .navbar-toggle .icon-bar { - background-color: #888; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e7e7e7; -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - background-color: #e7e7e7; - color: #555; -} -@media (max-width: 540px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333; - background-color: transparent; - } - .navbar-default .navbar-nav .open .dropdown-menu > .active > a, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #555; - background-color: #e7e7e7; - } - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #ccc; - background-color: transparent; - } -} -.navbar-default .navbar-link { - color: #777; -} -.navbar-default .navbar-link:hover { - color: #333; -} -.navbar-default .btn-link { - color: #777; -} -.navbar-default .btn-link:hover, -.navbar-default .btn-link:focus { - color: #333; -} -.navbar-default .btn-link[disabled]:hover, -fieldset[disabled] .navbar-default .btn-link:hover, -.navbar-default .btn-link[disabled]:focus, -fieldset[disabled] .navbar-default .btn-link:focus { - color: #ccc; -} -.navbar-inverse { - background-color: #222; - border-color: #080808; -} -.navbar-inverse .navbar-brand { - color: #9d9d9d; -} -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #9d9d9d; -} -.navbar-inverse .navbar-nav > li > a { - color: #9d9d9d; -} -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #fff; - background-color: #080808; -} -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444; - background-color: transparent; -} -.navbar-inverse .navbar-toggle { - border-color: #333; -} -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333; -} -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #fff; -} -.navbar-inverse .navbar-collapse, -.navbar-inverse .navbar-form { - border-color: #101010; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - background-color: #080808; - color: #fff; -} -@media (max-width: 540px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu .divider { - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #9d9d9d; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #fff; - background-color: transparent; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #444; - background-color: transparent; - } -} -.navbar-inverse .navbar-link { - color: #9d9d9d; -} -.navbar-inverse .navbar-link:hover { - color: #fff; -} -.navbar-inverse .btn-link { - color: #9d9d9d; -} -.navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link:focus { - color: #fff; -} -.navbar-inverse .btn-link[disabled]:hover, -fieldset[disabled] .navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link[disabled]:focus, -fieldset[disabled] .navbar-inverse .btn-link:focus { - color: #444; -} -.breadcrumb { - padding: 8px 15px; - margin-bottom: 18px; - list-style: none; - background-color: #f5f5f5; - border-radius: 2px; -} -.breadcrumb > li { - display: inline-block; -} -.breadcrumb > li + li:before { - content: "/\00a0"; - padding: 0 5px; - color: #5e5e5e; -} -.breadcrumb > .active { - color: #777777; -} -.pagination { - display: inline-block; - padding-left: 0; - margin: 18px 0; - border-radius: 2px; -} -.pagination > li { - display: inline; -} -.pagination > li > a, -.pagination > li > span { - position: relative; - float: left; - padding: 6px 12px; - line-height: 1.42857143; - text-decoration: none; - color: #337ab7; - background-color: #fff; - border: 1px solid #ddd; - margin-left: -1px; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - margin-left: 0; - border-bottom-left-radius: 2px; - border-top-left-radius: 2px; -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-bottom-right-radius: 2px; - border-top-right-radius: 2px; -} -.pagination > li > a:hover, -.pagination > li > span:hover, -.pagination > li > a:focus, -.pagination > li > span:focus { - z-index: 2; - color: #23527c; - background-color: #eeeeee; - border-color: #ddd; -} -.pagination > .active > a, -.pagination > .active > span, -.pagination > .active > a:hover, -.pagination > .active > span:hover, -.pagination > .active > a:focus, -.pagination > .active > span:focus { - z-index: 3; - color: #fff; - background-color: #337ab7; - border-color: #337ab7; - cursor: default; -} -.pagination > .disabled > span, -.pagination > .disabled > span:hover, -.pagination > .disabled > span:focus, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #777777; - background-color: #fff; - border-color: #ddd; - cursor: not-allowed; -} -.pagination-lg > li > a, -.pagination-lg > li > span { - padding: 10px 16px; - font-size: 17px; - line-height: 1.3333333; -} -.pagination-lg > li:first-child > a, -.pagination-lg > li:first-child > span { - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; -} -.pagination-lg > li:last-child > a, -.pagination-lg > li:last-child > span { - border-bottom-right-radius: 3px; - border-top-right-radius: 3px; -} -.pagination-sm > li > a, -.pagination-sm > li > span { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; -} -.pagination-sm > li:first-child > a, -.pagination-sm > li:first-child > span { - border-bottom-left-radius: 1px; - border-top-left-radius: 1px; -} -.pagination-sm > li:last-child > a, -.pagination-sm > li:last-child > span { - border-bottom-right-radius: 1px; - border-top-right-radius: 1px; -} -.pager { - padding-left: 0; - margin: 18px 0; - list-style: none; - text-align: center; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} -.pager .next > a, -.pager .next > span { - float: right; -} -.pager .previous > a, -.pager .previous > span { - float: left; -} -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #777777; - background-color: #fff; - cursor: not-allowed; -} -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} -a.label:hover, -a.label:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.label:empty { - display: none; -} -.btn .label { - position: relative; - top: -1px; -} -.label-default { - background-color: #777777; -} -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #5e5e5e; -} -.label-primary { - background-color: #337ab7; -} -.label-primary[href]:hover, -.label-primary[href]:focus { - background-color: #286090; -} -.label-success { - background-color: #5cb85c; -} -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} -.label-info { - background-color: #5bc0de; -} -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} -.label-warning { - background-color: #f0ad4e; -} -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} -.label-danger { - background-color: #d9534f; -} -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - color: #fff; - line-height: 1; - vertical-align: middle; - white-space: nowrap; - text-align: center; - background-color: #777777; - border-radius: 10px; -} -.badge:empty { - display: none; -} -.btn .badge { - position: relative; - top: -1px; -} -.btn-xs .badge, -.btn-group-xs > .btn .badge { - top: 0; - padding: 1px 5px; -} -a.badge:hover, -a.badge:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #337ab7; - background-color: #fff; -} -.list-group-item > .badge { - float: right; -} -.list-group-item > .badge + .badge { - margin-right: 5px; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} -.jumbotron { - padding-top: 30px; - padding-bottom: 30px; - margin-bottom: 30px; - color: inherit; - background-color: #eeeeee; -} -.jumbotron h1, -.jumbotron .h1 { - color: inherit; -} -.jumbotron p { - margin-bottom: 15px; - font-size: 20px; - font-weight: 200; -} -.jumbotron > hr { - border-top-color: #d5d5d5; -} -.container .jumbotron, -.container-fluid .jumbotron { - border-radius: 3px; - padding-left: 0px; - padding-right: 0px; -} -.jumbotron .container { - max-width: 100%; -} -@media screen and (min-width: 768px) { - .jumbotron { - padding-top: 48px; - padding-bottom: 48px; - } - .container .jumbotron, - .container-fluid .jumbotron { - padding-left: 60px; - padding-right: 60px; - } - .jumbotron h1, - .jumbotron .h1 { - font-size: 59px; - } -} -.thumbnail { - display: block; - padding: 4px; - margin-bottom: 18px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 2px; - -webkit-transition: border 0.2s ease-in-out; - -o-transition: border 0.2s ease-in-out; - transition: border 0.2s ease-in-out; -} -.thumbnail > img, -.thumbnail a > img { - margin-left: auto; - margin-right: auto; -} -a.thumbnail:hover, -a.thumbnail:focus, -a.thumbnail.active { - border-color: #337ab7; -} -.thumbnail .caption { - padding: 9px; - color: #000; -} -.alert { - padding: 15px; - margin-bottom: 18px; - border: 1px solid transparent; - border-radius: 2px; -} -.alert h4 { - margin-top: 0; - color: inherit; -} -.alert .alert-link { - font-weight: bold; -} -.alert > p, -.alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} -.alert-dismissable, -.alert-dismissible { - padding-right: 35px; -} -.alert-dismissable .close, -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} -.alert-success { - background-color: #dff0d8; - border-color: #d6e9c6; - color: #3c763d; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} -.alert-info { - background-color: #d9edf7; - border-color: #bce8f1; - color: #31708f; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #245269; -} -.alert-warning { - background-color: #fcf8e3; - border-color: #faebcc; - color: #8a6d3b; -} -.alert-warning hr { - border-top-color: #f7e1b5; -} -.alert-warning .alert-link { - color: #66512c; -} -.alert-danger { - background-color: #f2dede; - border-color: #ebccd1; - color: #a94442; -} -.alert-danger hr { - border-top-color: #e4b9c0; -} -.alert-danger .alert-link { - color: #843534; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - overflow: hidden; - height: 18px; - margin-bottom: 18px; - background-color: #f5f5f5; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} -.progress-bar { - float: left; - width: 0%; - height: 100%; - font-size: 12px; - line-height: 18px; - color: #fff; - text-align: center; - background-color: #337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-transition: width 0.6s ease; - -o-transition: width 0.6s ease; - transition: width 0.6s ease; -} -.progress-striped .progress-bar, -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 40px 40px; -} -.progress.active .progress-bar, -.progress-bar.active { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-bar-success { - background-color: #5cb85c; -} -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.media { - margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -.media, -.media-body { - zoom: 1; - overflow: hidden; -} -.media-body { - width: 10000px; -} -.media-object { - display: block; -} -.media-object.img-thumbnail { - max-width: none; -} -.media-right, -.media > .pull-right { - padding-left: 10px; -} -.media-left, -.media > .pull-left { - padding-right: 10px; -} -.media-left, -.media-right, -.media-body { - display: table-cell; - vertical-align: top; -} -.media-middle { - vertical-align: middle; -} -.media-bottom { - vertical-align: bottom; -} -.media-heading { - margin-top: 0; - margin-bottom: 5px; -} -.media-list { - padding-left: 0; - list-style: none; -} -.list-group { - margin-bottom: 20px; - padding-left: 0; -} -.list-group-item { - position: relative; - display: block; - padding: 10px 15px; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid #ddd; -} -.list-group-item:first-child { - border-top-right-radius: 2px; - border-top-left-radius: 2px; -} -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 2px; -} -a.list-group-item, -button.list-group-item { - color: #555; -} -a.list-group-item .list-group-item-heading, -button.list-group-item .list-group-item-heading { - color: #333; -} -a.list-group-item:hover, -button.list-group-item:hover, -a.list-group-item:focus, -button.list-group-item:focus { - text-decoration: none; - color: #555; - background-color: #f5f5f5; -} -button.list-group-item { - width: 100%; - text-align: left; -} -.list-group-item.disabled, -.list-group-item.disabled:hover, -.list-group-item.disabled:focus { - background-color: #eeeeee; - color: #777777; - cursor: not-allowed; -} -.list-group-item.disabled .list-group-item-heading, -.list-group-item.disabled:hover .list-group-item-heading, -.list-group-item.disabled:focus .list-group-item-heading { - color: inherit; -} -.list-group-item.disabled .list-group-item-text, -.list-group-item.disabled:hover .list-group-item-text, -.list-group-item.disabled:focus .list-group-item-text { - color: #777777; -} -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - z-index: 2; - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.list-group-item.active .list-group-item-heading, -.list-group-item.active:hover .list-group-item-heading, -.list-group-item.active:focus .list-group-item-heading, -.list-group-item.active .list-group-item-heading > small, -.list-group-item.active:hover .list-group-item-heading > small, -.list-group-item.active:focus .list-group-item-heading > small, -.list-group-item.active .list-group-item-heading > .small, -.list-group-item.active:hover .list-group-item-heading > .small, -.list-group-item.active:focus .list-group-item-heading > .small { - color: inherit; -} -.list-group-item.active .list-group-item-text, -.list-group-item.active:hover .list-group-item-text, -.list-group-item.active:focus .list-group-item-text { - color: #c7ddef; -} -.list-group-item-success { - color: #3c763d; - background-color: #dff0d8; -} -a.list-group-item-success, -button.list-group-item-success { - color: #3c763d; -} -a.list-group-item-success .list-group-item-heading, -button.list-group-item-success .list-group-item-heading { - color: inherit; -} -a.list-group-item-success:hover, -button.list-group-item-success:hover, -a.list-group-item-success:focus, -button.list-group-item-success:focus { - color: #3c763d; - background-color: #d0e9c6; -} -a.list-group-item-success.active, -button.list-group-item-success.active, -a.list-group-item-success.active:hover, -button.list-group-item-success.active:hover, -a.list-group-item-success.active:focus, -button.list-group-item-success.active:focus { - color: #fff; - background-color: #3c763d; - border-color: #3c763d; -} -.list-group-item-info { - color: #31708f; - background-color: #d9edf7; -} -a.list-group-item-info, -button.list-group-item-info { - color: #31708f; -} -a.list-group-item-info .list-group-item-heading, -button.list-group-item-info .list-group-item-heading { - color: inherit; -} -a.list-group-item-info:hover, -button.list-group-item-info:hover, -a.list-group-item-info:focus, -button.list-group-item-info:focus { - color: #31708f; - background-color: #c4e3f3; -} -a.list-group-item-info.active, -button.list-group-item-info.active, -a.list-group-item-info.active:hover, -button.list-group-item-info.active:hover, -a.list-group-item-info.active:focus, -button.list-group-item-info.active:focus { - color: #fff; - background-color: #31708f; - border-color: #31708f; -} -.list-group-item-warning { - color: #8a6d3b; - background-color: #fcf8e3; -} -a.list-group-item-warning, -button.list-group-item-warning { - color: #8a6d3b; -} -a.list-group-item-warning .list-group-item-heading, -button.list-group-item-warning .list-group-item-heading { - color: inherit; -} -a.list-group-item-warning:hover, -button.list-group-item-warning:hover, -a.list-group-item-warning:focus, -button.list-group-item-warning:focus { - color: #8a6d3b; - background-color: #faf2cc; -} -a.list-group-item-warning.active, -button.list-group-item-warning.active, -a.list-group-item-warning.active:hover, -button.list-group-item-warning.active:hover, -a.list-group-item-warning.active:focus, -button.list-group-item-warning.active:focus { - color: #fff; - background-color: #8a6d3b; - border-color: #8a6d3b; -} -.list-group-item-danger { - color: #a94442; - background-color: #f2dede; -} -a.list-group-item-danger, -button.list-group-item-danger { - color: #a94442; -} -a.list-group-item-danger .list-group-item-heading, -button.list-group-item-danger .list-group-item-heading { - color: inherit; -} -a.list-group-item-danger:hover, -button.list-group-item-danger:hover, -a.list-group-item-danger:focus, -button.list-group-item-danger:focus { - color: #a94442; - background-color: #ebcccc; -} -a.list-group-item-danger.active, -button.list-group-item-danger.active, -a.list-group-item-danger.active:hover, -button.list-group-item-danger.active:hover, -a.list-group-item-danger.active:focus, -button.list-group-item-danger.active:focus { - color: #fff; - background-color: #a94442; - border-color: #a94442; -} -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; -} -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; -} -.panel { - margin-bottom: 18px; - background-color: #fff; - border: 1px solid transparent; - border-radius: 2px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); -} -.panel-body { - padding: 15px; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-right-radius: 1px; - border-top-left-radius: 1px; -} -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 15px; - color: inherit; -} -.panel-title > a, -.panel-title > small, -.panel-title > .small, -.panel-title > small > a, -.panel-title > .small > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - border-bottom-right-radius: 1px; - border-bottom-left-radius: 1px; -} -.panel > .list-group, -.panel > .panel-collapse > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item, -.panel > .panel-collapse > .list-group .list-group-item { - border-width: 1px 0; - border-radius: 0; -} -.panel > .list-group:first-child .list-group-item:first-child, -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { - border-top: 0; - border-top-right-radius: 1px; - border-top-left-radius: 1px; -} -.panel > .list-group:last-child .list-group-item:last-child, -.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { - border-bottom: 0; - border-bottom-right-radius: 1px; - border-bottom-left-radius: 1px; -} -.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.list-group + .panel-footer { - border-top-width: 0; -} -.panel > .table, -.panel > .table-responsive > .table, -.panel > .panel-collapse > .table { - margin-bottom: 0; -} -.panel > .table caption, -.panel > .table-responsive > .table caption, -.panel > .panel-collapse > .table caption { - padding-left: 15px; - padding-right: 15px; -} -.panel > .table:first-child, -.panel > .table-responsive:first-child > .table:first-child { - border-top-right-radius: 1px; - border-top-left-radius: 1px; -} -.panel > .table:first-child > thead:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { - border-top-left-radius: 1px; - border-top-right-radius: 1px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { - border-top-left-radius: 1px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { - border-top-right-radius: 1px; -} -.panel > .table:last-child, -.panel > .table-responsive:last-child > .table:last-child { - border-bottom-right-radius: 1px; - border-bottom-left-radius: 1px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { - border-bottom-left-radius: 1px; - border-bottom-right-radius: 1px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { - border-bottom-left-radius: 1px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { - border-bottom-right-radius: 1px; -} -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive, -.panel > .table + .panel-body, -.panel > .table-responsive + .panel-body { - border-top: 1px solid #ddd; -} -.panel > .table > tbody:first-child > tr:first-child th, -.panel > .table > tbody:first-child > tr:first-child td { - border-top: 0; -} -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} -.panel > .table-bordered > thead > tr:first-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, -.panel > .table-bordered > tbody > tr:first-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, -.panel > .table-bordered > thead > tr:first-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, -.panel > .table-bordered > tbody > tr:first-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { - border-bottom: 0; -} -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { - border-bottom: 0; -} -.panel > .table-responsive { - border: 0; - margin-bottom: 0; -} -.panel-group { - margin-bottom: 18px; -} -.panel-group .panel { - margin-bottom: 0; - border-radius: 2px; -} -.panel-group .panel + .panel { - margin-top: 5px; -} -.panel-group .panel-heading { - border-bottom: 0; -} -.panel-group .panel-heading + .panel-collapse > .panel-body, -.panel-group .panel-heading + .panel-collapse > .list-group { - border-top: 1px solid #ddd; -} -.panel-group .panel-footer { - border-top: 0; -} -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #ddd; -} -.panel-default { - border-color: #ddd; -} -.panel-default > .panel-heading { - color: #333333; - background-color: #f5f5f5; - border-color: #ddd; -} -.panel-default > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ddd; -} -.panel-default > .panel-heading .badge { - color: #f5f5f5; - background-color: #333333; -} -.panel-default > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ddd; -} -.panel-primary { - border-color: #337ab7; -} -.panel-primary > .panel-heading { - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.panel-primary > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #337ab7; -} -.panel-primary > .panel-heading .badge { - color: #337ab7; - background-color: #fff; -} -.panel-primary > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #337ab7; -} -.panel-success { - border-color: #d6e9c6; -} -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.panel-success > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #d6e9c6; -} -.panel-success > .panel-heading .badge { - color: #dff0d8; - background-color: #3c763d; -} -.panel-success > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #d6e9c6; -} -.panel-info { - border-color: #bce8f1; -} -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.panel-info > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #bce8f1; -} -.panel-info > .panel-heading .badge { - color: #d9edf7; - background-color: #31708f; -} -.panel-info > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #bce8f1; -} -.panel-warning { - border-color: #faebcc; -} -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.panel-warning > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #faebcc; -} -.panel-warning > .panel-heading .badge { - color: #fcf8e3; - background-color: #8a6d3b; -} -.panel-warning > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #faebcc; -} -.panel-danger { - border-color: #ebccd1; -} -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.panel-danger > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ebccd1; -} -.panel-danger > .panel-heading .badge { - color: #f2dede; - background-color: #a94442; -} -.panel-danger > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ebccd1; -} -.embed-responsive { - position: relative; - display: block; - height: 0; - padding: 0; - overflow: hidden; -} -.embed-responsive .embed-responsive-item, -.embed-responsive iframe, -.embed-responsive embed, -.embed-responsive object, -.embed-responsive video { - position: absolute; - top: 0; - left: 0; - bottom: 0; - height: 100%; - width: 100%; - border: 0; -} -.embed-responsive-16by9 { - padding-bottom: 56.25%; -} -.embed-responsive-4by3 { - padding-bottom: 75%; -} -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} -.well-lg { - padding: 24px; - border-radius: 3px; -} -.well-sm { - padding: 9px; - border-radius: 1px; -} -.close { - float: right; - font-size: 19.5px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - opacity: 0.2; - filter: alpha(opacity=20); -} -.close:hover, -.close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - opacity: 0.5; - filter: alpha(opacity=50); -} -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} -.modal-open { - overflow: hidden; -} -.modal { - display: none; - overflow: hidden; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1050; - -webkit-overflow-scrolling: touch; - outline: 0; -} -.modal.fade .modal-dialog { - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - -o-transform: translate(0, -25%); - transform: translate(0, -25%); - -webkit-transition: -webkit-transform 0.3s ease-out; - -moz-transition: -moz-transform 0.3s ease-out; - -o-transition: -o-transform 0.3s ease-out; - transition: transform 0.3s ease-out; -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} -.modal-open .modal { - overflow-x: hidden; - overflow-y: auto; -} -.modal-dialog { - position: relative; - width: auto; - margin: 10px; -} -.modal-content { - position: relative; - background-color: #fff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 3px; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - background-clip: padding-box; - outline: 0; -} -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; -} -.modal-backdrop.fade { - opacity: 0; - filter: alpha(opacity=0); -} -.modal-backdrop.in { - opacity: 0.5; - filter: alpha(opacity=50); -} -.modal-header { - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} -.modal-header .close { - margin-top: -2px; -} -.modal-title { - margin: 0; - line-height: 1.42857143; -} -.modal-body { - position: relative; - padding: 15px; -} -.modal-footer { - padding: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} -.modal-footer .btn + .btn { - margin-left: 5px; - margin-bottom: 0; -} -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} -.modal-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; -} -@media (min-width: 768px) { - .modal-dialog { - width: 600px; - margin: 30px auto; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - } - .modal-sm { - width: 300px; - } -} -@media (min-width: 992px) { - .modal-lg { - width: 900px; - } -} -.tooltip { - position: absolute; - z-index: 1070; - display: block; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-style: normal; - font-weight: normal; - letter-spacing: normal; - line-break: auto; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - white-space: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - font-size: 12px; - opacity: 0; - filter: alpha(opacity=0); -} -.tooltip.in { - opacity: 0.9; - filter: alpha(opacity=90); -} -.tooltip.top { - margin-top: -3px; - padding: 5px 0; -} -.tooltip.right { - margin-left: 3px; - padding: 0 5px; -} -.tooltip.bottom { - margin-top: 3px; - padding: 5px 0; -} -.tooltip.left { - margin-left: -3px; - padding: 0 5px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #fff; - text-align: center; - background-color: #000; - border-radius: 2px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-left .tooltip-arrow { - bottom: 0; - right: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-right .tooltip-arrow { - bottom: 0; - left: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - right: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-right .tooltip-arrow { - top: 0; - left: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: none; - max-width: 276px; - padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-style: normal; - font-weight: normal; - letter-spacing: normal; - line-break: auto; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - white-space: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - font-size: 13px; - background-color: #fff; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 3px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -} -.popover.top { - margin-top: -10px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover-title { - margin: 0; - padding: 8px 14px; - font-size: 13px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 2px 2px 0 0; -} -.popover-content { - padding: 9px 14px; -} -.popover > .arrow, -.popover > .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow:after { - border-width: 10px; - content: ""; -} -.popover.top > .arrow { - left: 50%; - margin-left: -11px; - border-bottom-width: 0; - border-top-color: #999999; - border-top-color: rgba(0, 0, 0, 0.25); - bottom: -11px; -} -.popover.top > .arrow:after { - content: " "; - bottom: 1px; - margin-left: -10px; - border-bottom-width: 0; - border-top-color: #fff; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-left-width: 0; - border-right-color: #999999; - border-right-color: rgba(0, 0, 0, 0.25); -} -.popover.right > .arrow:after { - content: " "; - left: 1px; - bottom: -10px; - border-left-width: 0; - border-right-color: #fff; -} -.popover.bottom > .arrow { - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999999; - border-bottom-color: rgba(0, 0, 0, 0.25); - top: -11px; -} -.popover.bottom > .arrow:after { - content: " "; - top: 1px; - margin-left: -10px; - border-top-width: 0; - border-bottom-color: #fff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999999; - border-left-color: rgba(0, 0, 0, 0.25); -} -.popover.left > .arrow:after { - content: " "; - right: 1px; - border-right-width: 0; - border-left-color: #fff; - bottom: -10px; -} -.carousel { - position: relative; -} -.carousel-inner { - position: relative; - overflow: hidden; - width: 100%; -} -.carousel-inner > .item { - display: none; - position: relative; - -webkit-transition: 0.6s ease-in-out left; - -o-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - line-height: 1; -} -@media all and (transform-3d), (-webkit-transform-3d) { - .carousel-inner > .item { - -webkit-transition: -webkit-transform 0.6s ease-in-out; - -moz-transition: -moz-transform 0.6s ease-in-out; - -o-transition: -o-transform 0.6s ease-in-out; - transition: transform 0.6s ease-in-out; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-perspective: 1000px; - -moz-perspective: 1000px; - perspective: 1000px; - } - .carousel-inner > .item.next, - .carousel-inner > .item.active.right { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - left: 0; - } - .carousel-inner > .item.prev, - .carousel-inner > .item.active.left { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - left: 0; - } - .carousel-inner > .item.next.left, - .carousel-inner > .item.prev.right, - .carousel-inner > .item.active { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - left: 0; - } -} -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} -.carousel-inner > .active { - left: 0; -} -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel-inner > .next { - left: 100%; -} -.carousel-inner > .prev { - left: -100%; -} -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} -.carousel-inner > .active.left { - left: -100%; -} -.carousel-inner > .active.right { - left: 100%; -} -.carousel-control { - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: 15%; - opacity: 0.5; - filter: alpha(opacity=50); - font-size: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); - background-color: rgba(0, 0, 0, 0); -} -.carousel-control.left { - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); -} -.carousel-control.right { - left: auto; - right: 0; - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); -} -.carousel-control:hover, -.carousel-control:focus { - outline: 0; - color: #fff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} -.carousel-control .icon-prev, -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-left, -.carousel-control .glyphicon-chevron-right { - position: absolute; - top: 50%; - margin-top: -10px; - z-index: 5; - display: inline-block; -} -.carousel-control .icon-prev, -.carousel-control .glyphicon-chevron-left { - left: 50%; - margin-left: -10px; -} -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-right { - right: 50%; - margin-right: -10px; -} -.carousel-control .icon-prev, -.carousel-control .icon-next { - width: 20px; - height: 20px; - line-height: 1; - font-family: serif; -} -.carousel-control .icon-prev:before { - content: '\2039'; -} -.carousel-control .icon-next:before { - content: '\203a'; -} -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - margin-left: -30%; - padding-left: 0; - list-style: none; - text-align: center; -} -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - border: 1px solid #fff; - border-radius: 10px; - cursor: pointer; - background-color: #000 \9; - background-color: rgba(0, 0, 0, 0); -} -.carousel-indicators .active { - margin: 0; - width: 12px; - height: 12px; - background-color: #fff; -} -.carousel-caption { - position: absolute; - left: 15%; - right: 15%; - bottom: 20px; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -} -.carousel-caption .btn { - text-shadow: none; -} -@media screen and (min-width: 768px) { - .carousel-control .glyphicon-chevron-left, - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -10px; - font-size: 30px; - } - .carousel-control .glyphicon-chevron-left, - .carousel-control .icon-prev { - margin-left: -10px; - } - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-next { - margin-right: -10px; - } - .carousel-caption { - left: 20%; - right: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } -} -.clearfix:before, -.clearfix:after, -.dl-horizontal dd:before, -.dl-horizontal dd:after, -.container:before, -.container:after, -.container-fluid:before, -.container-fluid:after, -.row:before, -.row:after, -.form-horizontal .form-group:before, -.form-horizontal .form-group:after, -.btn-toolbar:before, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after, -.nav:before, -.nav:after, -.navbar:before, -.navbar:after, -.navbar-header:before, -.navbar-header:after, -.navbar-collapse:before, -.navbar-collapse:after, -.pager:before, -.pager:after, -.panel-body:before, -.panel-body:after, -.modal-header:before, -.modal-header:after, -.modal-footer:before, -.modal-footer:after, -.item_buttons:before, -.item_buttons:after { - content: " "; - display: table; -} -.clearfix:after, -.dl-horizontal dd:after, -.container:after, -.container-fluid:after, -.row:after, -.form-horizontal .form-group:after, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:after, -.nav:after, -.navbar:after, -.navbar-header:after, -.navbar-collapse:after, -.pager:after, -.panel-body:after, -.modal-header:after, -.modal-footer:after, -.item_buttons:after { - clear: both; -} -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; -} -.affix { - position: fixed; -} -@-ms-viewport { - width: device-width; -} -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table !important; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .visible-xs-block { - display: block !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline { - display: inline !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline-block { - display: inline-block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table !important; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-block { - display: block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline { - display: inline !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline-block { - display: inline-block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table !important; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-block { - display: block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline { - display: inline !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline-block { - display: inline-block !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table !important; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg-block { - display: block !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline { - display: inline !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline-block { - display: inline-block !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table !important; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -.visible-print-block { - display: none !important; -} -@media print { - .visible-print-block { - display: block !important; - } -} -.visible-print-inline { - display: none !important; -} -@media print { - .visible-print-inline { - display: inline !important; - } -} -.visible-print-inline-block { - display: none !important; -} -@media print { - .visible-print-inline-block { - display: inline-block !important; - } -} -@media print { - .hidden-print { - display: none !important; - } -} -/*! -* -* Font Awesome -* -*/ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */ -/* FONT PATH - * -------------------------- */ -@font-face { - font-family: 'FontAwesome'; - src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0'); - src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../components/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../components/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../components/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); - font-weight: normal; - font-style: normal; -} -.fa { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -/* makes the font 33% larger relative to the icon container */ -.fa-lg { - font-size: 1.33333333em; - line-height: 0.75em; - vertical-align: -15%; -} -.fa-2x { - font-size: 2em; -} -.fa-3x { - font-size: 3em; -} -.fa-4x { - font-size: 4em; -} -.fa-5x { - font-size: 5em; -} -.fa-fw { - width: 1.28571429em; - text-align: center; -} -.fa-ul { - padding-left: 0; - margin-left: 2.14285714em; - list-style-type: none; -} -.fa-ul > li { - position: relative; -} -.fa-li { - position: absolute; - left: -2.14285714em; - width: 2.14285714em; - top: 0.14285714em; - text-align: center; -} -.fa-li.fa-lg { - left: -1.85714286em; -} -.fa-border { - padding: .2em .25em .15em; - border: solid 0.08em #eee; - border-radius: .1em; -} -.fa-pull-left { - float: left; -} -.fa-pull-right { - float: right; -} -.fa.fa-pull-left { - margin-right: .3em; -} -.fa.fa-pull-right { - margin-left: .3em; -} -/* Deprecated as of 4.4.0 */ -.pull-right { - float: right; -} -.pull-left { - float: left; -} -.fa.pull-left { - margin-right: .3em; -} -.fa.pull-right { - margin-left: .3em; -} -.fa-spin { - -webkit-animation: fa-spin 2s infinite linear; - animation: fa-spin 2s infinite linear; -} -.fa-pulse { - -webkit-animation: fa-spin 1s infinite steps(8); - animation: fa-spin 1s infinite steps(8); -} -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -.fa-rotate-90 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -.fa-rotate-180 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} -.fa-rotate-270 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; - -webkit-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); -} -.fa-flip-horizontal { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; - -webkit-transform: scale(-1, 1); - -ms-transform: scale(-1, 1); - transform: scale(-1, 1); -} -.fa-flip-vertical { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; - -webkit-transform: scale(1, -1); - -ms-transform: scale(1, -1); - transform: scale(1, -1); -} -:root .fa-rotate-90, -:root .fa-rotate-180, -:root .fa-rotate-270, -:root .fa-flip-horizontal, -:root .fa-flip-vertical { - filter: none; -} -.fa-stack { - position: relative; - display: inline-block; - width: 2em; - height: 2em; - line-height: 2em; - vertical-align: middle; -} -.fa-stack-1x, -.fa-stack-2x { - position: absolute; - left: 0; - width: 100%; - text-align: center; -} -.fa-stack-1x { - line-height: inherit; -} -.fa-stack-2x { - font-size: 2em; -} -.fa-inverse { - color: #fff; -} -/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen - readers do not read off random characters that represent icons */ -.fa-glass:before { - content: "\f000"; -} -.fa-music:before { - content: "\f001"; -} -.fa-search:before { - content: "\f002"; -} -.fa-envelope-o:before { - content: "\f003"; -} -.fa-heart:before { - content: "\f004"; -} -.fa-star:before { - content: "\f005"; -} -.fa-star-o:before { - content: "\f006"; -} -.fa-user:before { - content: "\f007"; -} -.fa-film:before { - content: "\f008"; -} -.fa-th-large:before { - content: "\f009"; -} -.fa-th:before { - content: "\f00a"; -} -.fa-th-list:before { - content: "\f00b"; -} -.fa-check:before { - content: "\f00c"; -} -.fa-remove:before, -.fa-close:before, -.fa-times:before { - content: "\f00d"; -} -.fa-search-plus:before { - content: "\f00e"; -} -.fa-search-minus:before { - content: "\f010"; -} -.fa-power-off:before { - content: "\f011"; -} -.fa-signal:before { - content: "\f012"; -} -.fa-gear:before, -.fa-cog:before { - content: "\f013"; -} -.fa-trash-o:before { - content: "\f014"; -} -.fa-home:before { - content: "\f015"; -} -.fa-file-o:before { - content: "\f016"; -} -.fa-clock-o:before { - content: "\f017"; -} -.fa-road:before { - content: "\f018"; -} -.fa-download:before { - content: "\f019"; -} -.fa-arrow-circle-o-down:before { - content: "\f01a"; -} -.fa-arrow-circle-o-up:before { - content: "\f01b"; -} -.fa-inbox:before { - content: "\f01c"; -} -.fa-play-circle-o:before { - content: "\f01d"; -} -.fa-rotate-right:before, -.fa-repeat:before { - content: "\f01e"; -} -.fa-refresh:before { - content: "\f021"; -} -.fa-list-alt:before { - content: "\f022"; -} -.fa-lock:before { - content: "\f023"; -} -.fa-flag:before { - content: "\f024"; -} -.fa-headphones:before { - content: "\f025"; -} -.fa-volume-off:before { - content: "\f026"; -} -.fa-volume-down:before { - content: "\f027"; -} -.fa-volume-up:before { - content: "\f028"; -} -.fa-qrcode:before { - content: "\f029"; -} -.fa-barcode:before { - content: "\f02a"; -} -.fa-tag:before { - content: "\f02b"; -} -.fa-tags:before { - content: "\f02c"; -} -.fa-book:before { - content: "\f02d"; -} -.fa-bookmark:before { - content: "\f02e"; -} -.fa-print:before { - content: "\f02f"; -} -.fa-camera:before { - content: "\f030"; -} -.fa-font:before { - content: "\f031"; -} -.fa-bold:before { - content: "\f032"; -} -.fa-italic:before { - content: "\f033"; -} -.fa-text-height:before { - content: "\f034"; -} -.fa-text-width:before { - content: "\f035"; -} -.fa-align-left:before { - content: "\f036"; -} -.fa-align-center:before { - content: "\f037"; -} -.fa-align-right:before { - content: "\f038"; -} -.fa-align-justify:before { - content: "\f039"; -} -.fa-list:before { - content: "\f03a"; -} -.fa-dedent:before, -.fa-outdent:before { - content: "\f03b"; -} -.fa-indent:before { - content: "\f03c"; -} -.fa-video-camera:before { - content: "\f03d"; -} -.fa-photo:before, -.fa-image:before, -.fa-picture-o:before { - content: "\f03e"; -} -.fa-pencil:before { - content: "\f040"; -} -.fa-map-marker:before { - content: "\f041"; -} -.fa-adjust:before { - content: "\f042"; -} -.fa-tint:before { - content: "\f043"; -} -.fa-edit:before, -.fa-pencil-square-o:before { - content: "\f044"; -} -.fa-share-square-o:before { - content: "\f045"; -} -.fa-check-square-o:before { - content: "\f046"; -} -.fa-arrows:before { - content: "\f047"; -} -.fa-step-backward:before { - content: "\f048"; -} -.fa-fast-backward:before { - content: "\f049"; -} -.fa-backward:before { - content: "\f04a"; -} -.fa-play:before { - content: "\f04b"; -} -.fa-pause:before { - content: "\f04c"; -} -.fa-stop:before { - content: "\f04d"; -} -.fa-forward:before { - content: "\f04e"; -} -.fa-fast-forward:before { - content: "\f050"; -} -.fa-step-forward:before { - content: "\f051"; -} -.fa-eject:before { - content: "\f052"; -} -.fa-chevron-left:before { - content: "\f053"; -} -.fa-chevron-right:before { - content: "\f054"; -} -.fa-plus-circle:before { - content: "\f055"; -} -.fa-minus-circle:before { - content: "\f056"; -} -.fa-times-circle:before { - content: "\f057"; -} -.fa-check-circle:before { - content: "\f058"; -} -.fa-question-circle:before { - content: "\f059"; -} -.fa-info-circle:before { - content: "\f05a"; -} -.fa-crosshairs:before { - content: "\f05b"; -} -.fa-times-circle-o:before { - content: "\f05c"; -} -.fa-check-circle-o:before { - content: "\f05d"; -} -.fa-ban:before { - content: "\f05e"; -} -.fa-arrow-left:before { - content: "\f060"; -} -.fa-arrow-right:before { - content: "\f061"; -} -.fa-arrow-up:before { - content: "\f062"; -} -.fa-arrow-down:before { - content: "\f063"; -} -.fa-mail-forward:before, -.fa-share:before { - content: "\f064"; -} -.fa-expand:before { - content: "\f065"; -} -.fa-compress:before { - content: "\f066"; -} -.fa-plus:before { - content: "\f067"; -} -.fa-minus:before { - content: "\f068"; -} -.fa-asterisk:before { - content: "\f069"; -} -.fa-exclamation-circle:before { - content: "\f06a"; -} -.fa-gift:before { - content: "\f06b"; -} -.fa-leaf:before { - content: "\f06c"; -} -.fa-fire:before { - content: "\f06d"; -} -.fa-eye:before { - content: "\f06e"; -} -.fa-eye-slash:before { - content: "\f070"; -} -.fa-warning:before, -.fa-exclamation-triangle:before { - content: "\f071"; -} -.fa-plane:before { - content: "\f072"; -} -.fa-calendar:before { - content: "\f073"; -} -.fa-random:before { - content: "\f074"; -} -.fa-comment:before { - content: "\f075"; -} -.fa-magnet:before { - content: "\f076"; -} -.fa-chevron-up:before { - content: "\f077"; -} -.fa-chevron-down:before { - content: "\f078"; -} -.fa-retweet:before { - content: "\f079"; -} -.fa-shopping-cart:before { - content: "\f07a"; -} -.fa-folder:before { - content: "\f07b"; -} -.fa-folder-open:before { - content: "\f07c"; -} -.fa-arrows-v:before { - content: "\f07d"; -} -.fa-arrows-h:before { - content: "\f07e"; -} -.fa-bar-chart-o:before, -.fa-bar-chart:before { - content: "\f080"; -} -.fa-twitter-square:before { - content: "\f081"; -} -.fa-facebook-square:before { - content: "\f082"; -} -.fa-camera-retro:before { - content: "\f083"; -} -.fa-key:before { - content: "\f084"; -} -.fa-gears:before, -.fa-cogs:before { - content: "\f085"; -} -.fa-comments:before { - content: "\f086"; -} -.fa-thumbs-o-up:before { - content: "\f087"; -} -.fa-thumbs-o-down:before { - content: "\f088"; -} -.fa-star-half:before { - content: "\f089"; -} -.fa-heart-o:before { - content: "\f08a"; -} -.fa-sign-out:before { - content: "\f08b"; -} -.fa-linkedin-square:before { - content: "\f08c"; -} -.fa-thumb-tack:before { - content: "\f08d"; -} -.fa-external-link:before { - content: "\f08e"; -} -.fa-sign-in:before { - content: "\f090"; -} -.fa-trophy:before { - content: "\f091"; -} -.fa-github-square:before { - content: "\f092"; -} -.fa-upload:before { - content: "\f093"; -} -.fa-lemon-o:before { - content: "\f094"; -} -.fa-phone:before { - content: "\f095"; -} -.fa-square-o:before { - content: "\f096"; -} -.fa-bookmark-o:before { - content: "\f097"; -} -.fa-phone-square:before { - content: "\f098"; -} -.fa-twitter:before { - content: "\f099"; -} -.fa-facebook-f:before, -.fa-facebook:before { - content: "\f09a"; -} -.fa-github:before { - content: "\f09b"; -} -.fa-unlock:before { - content: "\f09c"; -} -.fa-credit-card:before { - content: "\f09d"; -} -.fa-feed:before, -.fa-rss:before { - content: "\f09e"; -} -.fa-hdd-o:before { - content: "\f0a0"; -} -.fa-bullhorn:before { - content: "\f0a1"; -} -.fa-bell:before { - content: "\f0f3"; -} -.fa-certificate:before { - content: "\f0a3"; -} -.fa-hand-o-right:before { - content: "\f0a4"; -} -.fa-hand-o-left:before { - content: "\f0a5"; -} -.fa-hand-o-up:before { - content: "\f0a6"; -} -.fa-hand-o-down:before { - content: "\f0a7"; -} -.fa-arrow-circle-left:before { - content: "\f0a8"; -} -.fa-arrow-circle-right:before { - content: "\f0a9"; -} -.fa-arrow-circle-up:before { - content: "\f0aa"; -} -.fa-arrow-circle-down:before { - content: "\f0ab"; -} -.fa-globe:before { - content: "\f0ac"; -} -.fa-wrench:before { - content: "\f0ad"; -} -.fa-tasks:before { - content: "\f0ae"; -} -.fa-filter:before { - content: "\f0b0"; -} -.fa-briefcase:before { - content: "\f0b1"; -} -.fa-arrows-alt:before { - content: "\f0b2"; -} -.fa-group:before, -.fa-users:before { - content: "\f0c0"; -} -.fa-chain:before, -.fa-link:before { - content: "\f0c1"; -} -.fa-cloud:before { - content: "\f0c2"; -} -.fa-flask:before { - content: "\f0c3"; -} -.fa-cut:before, -.fa-scissors:before { - content: "\f0c4"; -} -.fa-copy:before, -.fa-files-o:before { - content: "\f0c5"; -} -.fa-paperclip:before { - content: "\f0c6"; -} -.fa-save:before, -.fa-floppy-o:before { - content: "\f0c7"; -} -.fa-square:before { - content: "\f0c8"; -} -.fa-navicon:before, -.fa-reorder:before, -.fa-bars:before { - content: "\f0c9"; -} -.fa-list-ul:before { - content: "\f0ca"; -} -.fa-list-ol:before { - content: "\f0cb"; -} -.fa-strikethrough:before { - content: "\f0cc"; -} -.fa-underline:before { - content: "\f0cd"; -} -.fa-table:before { - content: "\f0ce"; -} -.fa-magic:before { - content: "\f0d0"; -} -.fa-truck:before { - content: "\f0d1"; -} -.fa-pinterest:before { - content: "\f0d2"; -} -.fa-pinterest-square:before { - content: "\f0d3"; -} -.fa-google-plus-square:before { - content: "\f0d4"; -} -.fa-google-plus:before { - content: "\f0d5"; -} -.fa-money:before { - content: "\f0d6"; -} -.fa-caret-down:before { - content: "\f0d7"; -} -.fa-caret-up:before { - content: "\f0d8"; -} -.fa-caret-left:before { - content: "\f0d9"; -} -.fa-caret-right:before { - content: "\f0da"; -} -.fa-columns:before { - content: "\f0db"; -} -.fa-unsorted:before, -.fa-sort:before { - content: "\f0dc"; -} -.fa-sort-down:before, -.fa-sort-desc:before { - content: "\f0dd"; -} -.fa-sort-up:before, -.fa-sort-asc:before { - content: "\f0de"; -} -.fa-envelope:before { - content: "\f0e0"; -} -.fa-linkedin:before { - content: "\f0e1"; -} -.fa-rotate-left:before, -.fa-undo:before { - content: "\f0e2"; -} -.fa-legal:before, -.fa-gavel:before { - content: "\f0e3"; -} -.fa-dashboard:before, -.fa-tachometer:before { - content: "\f0e4"; -} -.fa-comment-o:before { - content: "\f0e5"; -} -.fa-comments-o:before { - content: "\f0e6"; -} -.fa-flash:before, -.fa-bolt:before { - content: "\f0e7"; -} -.fa-sitemap:before { - content: "\f0e8"; -} -.fa-umbrella:before { - content: "\f0e9"; -} -.fa-paste:before, -.fa-clipboard:before { - content: "\f0ea"; -} -.fa-lightbulb-o:before { - content: "\f0eb"; -} -.fa-exchange:before { - content: "\f0ec"; -} -.fa-cloud-download:before { - content: "\f0ed"; -} -.fa-cloud-upload:before { - content: "\f0ee"; -} -.fa-user-md:before { - content: "\f0f0"; -} -.fa-stethoscope:before { - content: "\f0f1"; -} -.fa-suitcase:before { - content: "\f0f2"; -} -.fa-bell-o:before { - content: "\f0a2"; -} -.fa-coffee:before { - content: "\f0f4"; -} -.fa-cutlery:before { - content: "\f0f5"; -} -.fa-file-text-o:before { - content: "\f0f6"; -} -.fa-building-o:before { - content: "\f0f7"; -} -.fa-hospital-o:before { - content: "\f0f8"; -} -.fa-ambulance:before { - content: "\f0f9"; -} -.fa-medkit:before { - content: "\f0fa"; -} -.fa-fighter-jet:before { - content: "\f0fb"; -} -.fa-beer:before { - content: "\f0fc"; -} -.fa-h-square:before { - content: "\f0fd"; -} -.fa-plus-square:before { - content: "\f0fe"; -} -.fa-angle-double-left:before { - content: "\f100"; -} -.fa-angle-double-right:before { - content: "\f101"; -} -.fa-angle-double-up:before { - content: "\f102"; -} -.fa-angle-double-down:before { - content: "\f103"; -} -.fa-angle-left:before { - content: "\f104"; -} -.fa-angle-right:before { - content: "\f105"; -} -.fa-angle-up:before { - content: "\f106"; -} -.fa-angle-down:before { - content: "\f107"; -} -.fa-desktop:before { - content: "\f108"; -} -.fa-laptop:before { - content: "\f109"; -} -.fa-tablet:before { - content: "\f10a"; -} -.fa-mobile-phone:before, -.fa-mobile:before { - content: "\f10b"; -} -.fa-circle-o:before { - content: "\f10c"; -} -.fa-quote-left:before { - content: "\f10d"; -} -.fa-quote-right:before { - content: "\f10e"; -} -.fa-spinner:before { - content: "\f110"; -} -.fa-circle:before { - content: "\f111"; -} -.fa-mail-reply:before, -.fa-reply:before { - content: "\f112"; -} -.fa-github-alt:before { - content: "\f113"; -} -.fa-folder-o:before { - content: "\f114"; -} -.fa-folder-open-o:before { - content: "\f115"; -} -.fa-smile-o:before { - content: "\f118"; -} -.fa-frown-o:before { - content: "\f119"; -} -.fa-meh-o:before { - content: "\f11a"; -} -.fa-gamepad:before { - content: "\f11b"; -} -.fa-keyboard-o:before { - content: "\f11c"; -} -.fa-flag-o:before { - content: "\f11d"; -} -.fa-flag-checkered:before { - content: "\f11e"; -} -.fa-terminal:before { - content: "\f120"; -} -.fa-code:before { - content: "\f121"; -} -.fa-mail-reply-all:before, -.fa-reply-all:before { - content: "\f122"; -} -.fa-star-half-empty:before, -.fa-star-half-full:before, -.fa-star-half-o:before { - content: "\f123"; -} -.fa-location-arrow:before { - content: "\f124"; -} -.fa-crop:before { - content: "\f125"; -} -.fa-code-fork:before { - content: "\f126"; -} -.fa-unlink:before, -.fa-chain-broken:before { - content: "\f127"; -} -.fa-question:before { - content: "\f128"; -} -.fa-info:before { - content: "\f129"; -} -.fa-exclamation:before { - content: "\f12a"; -} -.fa-superscript:before { - content: "\f12b"; -} -.fa-subscript:before { - content: "\f12c"; -} -.fa-eraser:before { - content: "\f12d"; -} -.fa-puzzle-piece:before { - content: "\f12e"; -} -.fa-microphone:before { - content: "\f130"; -} -.fa-microphone-slash:before { - content: "\f131"; -} -.fa-shield:before { - content: "\f132"; -} -.fa-calendar-o:before { - content: "\f133"; -} -.fa-fire-extinguisher:before { - content: "\f134"; -} -.fa-rocket:before { - content: "\f135"; -} -.fa-maxcdn:before { - content: "\f136"; -} -.fa-chevron-circle-left:before { - content: "\f137"; -} -.fa-chevron-circle-right:before { - content: "\f138"; -} -.fa-chevron-circle-up:before { - content: "\f139"; -} -.fa-chevron-circle-down:before { - content: "\f13a"; -} -.fa-html5:before { - content: "\f13b"; -} -.fa-css3:before { - content: "\f13c"; -} -.fa-anchor:before { - content: "\f13d"; -} -.fa-unlock-alt:before { - content: "\f13e"; -} -.fa-bullseye:before { - content: "\f140"; -} -.fa-ellipsis-h:before { - content: "\f141"; -} -.fa-ellipsis-v:before { - content: "\f142"; -} -.fa-rss-square:before { - content: "\f143"; -} -.fa-play-circle:before { - content: "\f144"; -} -.fa-ticket:before { - content: "\f145"; -} -.fa-minus-square:before { - content: "\f146"; -} -.fa-minus-square-o:before { - content: "\f147"; -} -.fa-level-up:before { - content: "\f148"; -} -.fa-level-down:before { - content: "\f149"; -} -.fa-check-square:before { - content: "\f14a"; -} -.fa-pencil-square:before { - content: "\f14b"; -} -.fa-external-link-square:before { - content: "\f14c"; -} -.fa-share-square:before { - content: "\f14d"; -} -.fa-compass:before { - content: "\f14e"; -} -.fa-toggle-down:before, -.fa-caret-square-o-down:before { - content: "\f150"; -} -.fa-toggle-up:before, -.fa-caret-square-o-up:before { - content: "\f151"; -} -.fa-toggle-right:before, -.fa-caret-square-o-right:before { - content: "\f152"; -} -.fa-euro:before, -.fa-eur:before { - content: "\f153"; -} -.fa-gbp:before { - content: "\f154"; -} -.fa-dollar:before, -.fa-usd:before { - content: "\f155"; -} -.fa-rupee:before, -.fa-inr:before { - content: "\f156"; -} -.fa-cny:before, -.fa-rmb:before, -.fa-yen:before, -.fa-jpy:before { - content: "\f157"; -} -.fa-ruble:before, -.fa-rouble:before, -.fa-rub:before { - content: "\f158"; -} -.fa-won:before, -.fa-krw:before { - content: "\f159"; -} -.fa-bitcoin:before, -.fa-btc:before { - content: "\f15a"; -} -.fa-file:before { - content: "\f15b"; -} -.fa-file-text:before { - content: "\f15c"; -} -.fa-sort-alpha-asc:before { - content: "\f15d"; -} -.fa-sort-alpha-desc:before { - content: "\f15e"; -} -.fa-sort-amount-asc:before { - content: "\f160"; -} -.fa-sort-amount-desc:before { - content: "\f161"; -} -.fa-sort-numeric-asc:before { - content: "\f162"; -} -.fa-sort-numeric-desc:before { - content: "\f163"; -} -.fa-thumbs-up:before { - content: "\f164"; -} -.fa-thumbs-down:before { - content: "\f165"; -} -.fa-youtube-square:before { - content: "\f166"; -} -.fa-youtube:before { - content: "\f167"; -} -.fa-xing:before { - content: "\f168"; -} -.fa-xing-square:before { - content: "\f169"; -} -.fa-youtube-play:before { - content: "\f16a"; -} -.fa-dropbox:before { - content: "\f16b"; -} -.fa-stack-overflow:before { - content: "\f16c"; -} -.fa-instagram:before { - content: "\f16d"; -} -.fa-flickr:before { - content: "\f16e"; -} -.fa-adn:before { - content: "\f170"; -} -.fa-bitbucket:before { - content: "\f171"; -} -.fa-bitbucket-square:before { - content: "\f172"; -} -.fa-tumblr:before { - content: "\f173"; -} -.fa-tumblr-square:before { - content: "\f174"; -} -.fa-long-arrow-down:before { - content: "\f175"; -} -.fa-long-arrow-up:before { - content: "\f176"; -} -.fa-long-arrow-left:before { - content: "\f177"; -} -.fa-long-arrow-right:before { - content: "\f178"; -} -.fa-apple:before { - content: "\f179"; -} -.fa-windows:before { - content: "\f17a"; -} -.fa-android:before { - content: "\f17b"; -} -.fa-linux:before { - content: "\f17c"; -} -.fa-dribbble:before { - content: "\f17d"; -} -.fa-skype:before { - content: "\f17e"; -} -.fa-foursquare:before { - content: "\f180"; -} -.fa-trello:before { - content: "\f181"; -} -.fa-female:before { - content: "\f182"; -} -.fa-male:before { - content: "\f183"; -} -.fa-gittip:before, -.fa-gratipay:before { - content: "\f184"; -} -.fa-sun-o:before { - content: "\f185"; -} -.fa-moon-o:before { - content: "\f186"; -} -.fa-archive:before { - content: "\f187"; -} -.fa-bug:before { - content: "\f188"; -} -.fa-vk:before { - content: "\f189"; -} -.fa-weibo:before { - content: "\f18a"; -} -.fa-renren:before { - content: "\f18b"; -} -.fa-pagelines:before { - content: "\f18c"; -} -.fa-stack-exchange:before { - content: "\f18d"; -} -.fa-arrow-circle-o-right:before { - content: "\f18e"; -} -.fa-arrow-circle-o-left:before { - content: "\f190"; -} -.fa-toggle-left:before, -.fa-caret-square-o-left:before { - content: "\f191"; -} -.fa-dot-circle-o:before { - content: "\f192"; -} -.fa-wheelchair:before { - content: "\f193"; -} -.fa-vimeo-square:before { - content: "\f194"; -} -.fa-turkish-lira:before, -.fa-try:before { - content: "\f195"; -} -.fa-plus-square-o:before { - content: "\f196"; -} -.fa-space-shuttle:before { - content: "\f197"; -} -.fa-slack:before { - content: "\f198"; -} -.fa-envelope-square:before { - content: "\f199"; -} -.fa-wordpress:before { - content: "\f19a"; -} -.fa-openid:before { - content: "\f19b"; -} -.fa-institution:before, -.fa-bank:before, -.fa-university:before { - content: "\f19c"; -} -.fa-mortar-board:before, -.fa-graduation-cap:before { - content: "\f19d"; -} -.fa-yahoo:before { - content: "\f19e"; -} -.fa-google:before { - content: "\f1a0"; -} -.fa-reddit:before { - content: "\f1a1"; -} -.fa-reddit-square:before { - content: "\f1a2"; -} -.fa-stumbleupon-circle:before { - content: "\f1a3"; -} -.fa-stumbleupon:before { - content: "\f1a4"; -} -.fa-delicious:before { - content: "\f1a5"; -} -.fa-digg:before { - content: "\f1a6"; -} -.fa-pied-piper-pp:before { - content: "\f1a7"; -} -.fa-pied-piper-alt:before { - content: "\f1a8"; -} -.fa-drupal:before { - content: "\f1a9"; -} -.fa-joomla:before { - content: "\f1aa"; -} -.fa-language:before { - content: "\f1ab"; -} -.fa-fax:before { - content: "\f1ac"; -} -.fa-building:before { - content: "\f1ad"; -} -.fa-child:before { - content: "\f1ae"; -} -.fa-paw:before { - content: "\f1b0"; -} -.fa-spoon:before { - content: "\f1b1"; -} -.fa-cube:before { - content: "\f1b2"; -} -.fa-cubes:before { - content: "\f1b3"; -} -.fa-behance:before { - content: "\f1b4"; -} -.fa-behance-square:before { - content: "\f1b5"; -} -.fa-steam:before { - content: "\f1b6"; -} -.fa-steam-square:before { - content: "\f1b7"; -} -.fa-recycle:before { - content: "\f1b8"; -} -.fa-automobile:before, -.fa-car:before { - content: "\f1b9"; -} -.fa-cab:before, -.fa-taxi:before { - content: "\f1ba"; -} -.fa-tree:before { - content: "\f1bb"; -} -.fa-spotify:before { - content: "\f1bc"; -} -.fa-deviantart:before { - content: "\f1bd"; -} -.fa-soundcloud:before { - content: "\f1be"; -} -.fa-database:before { - content: "\f1c0"; -} -.fa-file-pdf-o:before { - content: "\f1c1"; -} -.fa-file-word-o:before { - content: "\f1c2"; -} -.fa-file-excel-o:before { - content: "\f1c3"; -} -.fa-file-powerpoint-o:before { - content: "\f1c4"; -} -.fa-file-photo-o:before, -.fa-file-picture-o:before, -.fa-file-image-o:before { - content: "\f1c5"; -} -.fa-file-zip-o:before, -.fa-file-archive-o:before { - content: "\f1c6"; -} -.fa-file-sound-o:before, -.fa-file-audio-o:before { - content: "\f1c7"; -} -.fa-file-movie-o:before, -.fa-file-video-o:before { - content: "\f1c8"; -} -.fa-file-code-o:before { - content: "\f1c9"; -} -.fa-vine:before { - content: "\f1ca"; -} -.fa-codepen:before { - content: "\f1cb"; -} -.fa-jsfiddle:before { - content: "\f1cc"; -} -.fa-life-bouy:before, -.fa-life-buoy:before, -.fa-life-saver:before, -.fa-support:before, -.fa-life-ring:before { - content: "\f1cd"; -} -.fa-circle-o-notch:before { - content: "\f1ce"; -} -.fa-ra:before, -.fa-resistance:before, -.fa-rebel:before { - content: "\f1d0"; -} -.fa-ge:before, -.fa-empire:before { - content: "\f1d1"; -} -.fa-git-square:before { - content: "\f1d2"; -} -.fa-git:before { - content: "\f1d3"; -} -.fa-y-combinator-square:before, -.fa-yc-square:before, -.fa-hacker-news:before { - content: "\f1d4"; -} -.fa-tencent-weibo:before { - content: "\f1d5"; -} -.fa-qq:before { - content: "\f1d6"; -} -.fa-wechat:before, -.fa-weixin:before { - content: "\f1d7"; -} -.fa-send:before, -.fa-paper-plane:before { - content: "\f1d8"; -} -.fa-send-o:before, -.fa-paper-plane-o:before { - content: "\f1d9"; -} -.fa-history:before { - content: "\f1da"; -} -.fa-circle-thin:before { - content: "\f1db"; -} -.fa-header:before { - content: "\f1dc"; -} -.fa-paragraph:before { - content: "\f1dd"; -} -.fa-sliders:before { - content: "\f1de"; -} -.fa-share-alt:before { - content: "\f1e0"; -} -.fa-share-alt-square:before { - content: "\f1e1"; -} -.fa-bomb:before { - content: "\f1e2"; -} -.fa-soccer-ball-o:before, -.fa-futbol-o:before { - content: "\f1e3"; -} -.fa-tty:before { - content: "\f1e4"; -} -.fa-binoculars:before { - content: "\f1e5"; -} -.fa-plug:before { - content: "\f1e6"; -} -.fa-slideshare:before { - content: "\f1e7"; -} -.fa-twitch:before { - content: "\f1e8"; -} -.fa-yelp:before { - content: "\f1e9"; -} -.fa-newspaper-o:before { - content: "\f1ea"; -} -.fa-wifi:before { - content: "\f1eb"; -} -.fa-calculator:before { - content: "\f1ec"; -} -.fa-paypal:before { - content: "\f1ed"; -} -.fa-google-wallet:before { - content: "\f1ee"; -} -.fa-cc-visa:before { - content: "\f1f0"; -} -.fa-cc-mastercard:before { - content: "\f1f1"; -} -.fa-cc-discover:before { - content: "\f1f2"; -} -.fa-cc-amex:before { - content: "\f1f3"; -} -.fa-cc-paypal:before { - content: "\f1f4"; -} -.fa-cc-stripe:before { - content: "\f1f5"; -} -.fa-bell-slash:before { - content: "\f1f6"; -} -.fa-bell-slash-o:before { - content: "\f1f7"; -} -.fa-trash:before { - content: "\f1f8"; -} -.fa-copyright:before { - content: "\f1f9"; -} -.fa-at:before { - content: "\f1fa"; -} -.fa-eyedropper:before { - content: "\f1fb"; -} -.fa-paint-brush:before { - content: "\f1fc"; -} -.fa-birthday-cake:before { - content: "\f1fd"; -} -.fa-area-chart:before { - content: "\f1fe"; -} -.fa-pie-chart:before { - content: "\f200"; -} -.fa-line-chart:before { - content: "\f201"; -} -.fa-lastfm:before { - content: "\f202"; -} -.fa-lastfm-square:before { - content: "\f203"; -} -.fa-toggle-off:before { - content: "\f204"; -} -.fa-toggle-on:before { - content: "\f205"; -} -.fa-bicycle:before { - content: "\f206"; -} -.fa-bus:before { - content: "\f207"; -} -.fa-ioxhost:before { - content: "\f208"; -} -.fa-angellist:before { - content: "\f209"; -} -.fa-cc:before { - content: "\f20a"; -} -.fa-shekel:before, -.fa-sheqel:before, -.fa-ils:before { - content: "\f20b"; -} -.fa-meanpath:before { - content: "\f20c"; -} -.fa-buysellads:before { - content: "\f20d"; -} -.fa-connectdevelop:before { - content: "\f20e"; -} -.fa-dashcube:before { - content: "\f210"; -} -.fa-forumbee:before { - content: "\f211"; -} -.fa-leanpub:before { - content: "\f212"; -} -.fa-sellsy:before { - content: "\f213"; -} -.fa-shirtsinbulk:before { - content: "\f214"; -} -.fa-simplybuilt:before { - content: "\f215"; -} -.fa-skyatlas:before { - content: "\f216"; -} -.fa-cart-plus:before { - content: "\f217"; -} -.fa-cart-arrow-down:before { - content: "\f218"; -} -.fa-diamond:before { - content: "\f219"; -} -.fa-ship:before { - content: "\f21a"; -} -.fa-user-secret:before { - content: "\f21b"; -} -.fa-motorcycle:before { - content: "\f21c"; -} -.fa-street-view:before { - content: "\f21d"; -} -.fa-heartbeat:before { - content: "\f21e"; -} -.fa-venus:before { - content: "\f221"; -} -.fa-mars:before { - content: "\f222"; -} -.fa-mercury:before { - content: "\f223"; -} -.fa-intersex:before, -.fa-transgender:before { - content: "\f224"; -} -.fa-transgender-alt:before { - content: "\f225"; -} -.fa-venus-double:before { - content: "\f226"; -} -.fa-mars-double:before { - content: "\f227"; -} -.fa-venus-mars:before { - content: "\f228"; -} -.fa-mars-stroke:before { - content: "\f229"; -} -.fa-mars-stroke-v:before { - content: "\f22a"; -} -.fa-mars-stroke-h:before { - content: "\f22b"; -} -.fa-neuter:before { - content: "\f22c"; -} -.fa-genderless:before { - content: "\f22d"; -} -.fa-facebook-official:before { - content: "\f230"; -} -.fa-pinterest-p:before { - content: "\f231"; -} -.fa-whatsapp:before { - content: "\f232"; -} -.fa-server:before { - content: "\f233"; -} -.fa-user-plus:before { - content: "\f234"; -} -.fa-user-times:before { - content: "\f235"; -} -.fa-hotel:before, -.fa-bed:before { - content: "\f236"; -} -.fa-viacoin:before { - content: "\f237"; -} -.fa-train:before { - content: "\f238"; -} -.fa-subway:before { - content: "\f239"; -} -.fa-medium:before { - content: "\f23a"; -} -.fa-yc:before, -.fa-y-combinator:before { - content: "\f23b"; -} -.fa-optin-monster:before { - content: "\f23c"; -} -.fa-opencart:before { - content: "\f23d"; -} -.fa-expeditedssl:before { - content: "\f23e"; -} -.fa-battery-4:before, -.fa-battery:before, -.fa-battery-full:before { - content: "\f240"; -} -.fa-battery-3:before, -.fa-battery-three-quarters:before { - content: "\f241"; -} -.fa-battery-2:before, -.fa-battery-half:before { - content: "\f242"; -} -.fa-battery-1:before, -.fa-battery-quarter:before { - content: "\f243"; -} -.fa-battery-0:before, -.fa-battery-empty:before { - content: "\f244"; -} -.fa-mouse-pointer:before { - content: "\f245"; -} -.fa-i-cursor:before { - content: "\f246"; -} -.fa-object-group:before { - content: "\f247"; -} -.fa-object-ungroup:before { - content: "\f248"; -} -.fa-sticky-note:before { - content: "\f249"; -} -.fa-sticky-note-o:before { - content: "\f24a"; -} -.fa-cc-jcb:before { - content: "\f24b"; -} -.fa-cc-diners-club:before { - content: "\f24c"; -} -.fa-clone:before { - content: "\f24d"; -} -.fa-balance-scale:before { - content: "\f24e"; -} -.fa-hourglass-o:before { - content: "\f250"; -} -.fa-hourglass-1:before, -.fa-hourglass-start:before { - content: "\f251"; -} -.fa-hourglass-2:before, -.fa-hourglass-half:before { - content: "\f252"; -} -.fa-hourglass-3:before, -.fa-hourglass-end:before { - content: "\f253"; -} -.fa-hourglass:before { - content: "\f254"; -} -.fa-hand-grab-o:before, -.fa-hand-rock-o:before { - content: "\f255"; -} -.fa-hand-stop-o:before, -.fa-hand-paper-o:before { - content: "\f256"; -} -.fa-hand-scissors-o:before { - content: "\f257"; -} -.fa-hand-lizard-o:before { - content: "\f258"; -} -.fa-hand-spock-o:before { - content: "\f259"; -} -.fa-hand-pointer-o:before { - content: "\f25a"; -} -.fa-hand-peace-o:before { - content: "\f25b"; -} -.fa-trademark:before { - content: "\f25c"; -} -.fa-registered:before { - content: "\f25d"; -} -.fa-creative-commons:before { - content: "\f25e"; -} -.fa-gg:before { - content: "\f260"; -} -.fa-gg-circle:before { - content: "\f261"; -} -.fa-tripadvisor:before { - content: "\f262"; -} -.fa-odnoklassniki:before { - content: "\f263"; -} -.fa-odnoklassniki-square:before { - content: "\f264"; -} -.fa-get-pocket:before { - content: "\f265"; -} -.fa-wikipedia-w:before { - content: "\f266"; -} -.fa-safari:before { - content: "\f267"; -} -.fa-chrome:before { - content: "\f268"; -} -.fa-firefox:before { - content: "\f269"; -} -.fa-opera:before { - content: "\f26a"; -} -.fa-internet-explorer:before { - content: "\f26b"; -} -.fa-tv:before, -.fa-television:before { - content: "\f26c"; -} -.fa-contao:before { - content: "\f26d"; -} -.fa-500px:before { - content: "\f26e"; -} -.fa-amazon:before { - content: "\f270"; -} -.fa-calendar-plus-o:before { - content: "\f271"; -} -.fa-calendar-minus-o:before { - content: "\f272"; -} -.fa-calendar-times-o:before { - content: "\f273"; -} -.fa-calendar-check-o:before { - content: "\f274"; -} -.fa-industry:before { - content: "\f275"; -} -.fa-map-pin:before { - content: "\f276"; -} -.fa-map-signs:before { - content: "\f277"; -} -.fa-map-o:before { - content: "\f278"; -} -.fa-map:before { - content: "\f279"; -} -.fa-commenting:before { - content: "\f27a"; -} -.fa-commenting-o:before { - content: "\f27b"; -} -.fa-houzz:before { - content: "\f27c"; -} -.fa-vimeo:before { - content: "\f27d"; -} -.fa-black-tie:before { - content: "\f27e"; -} -.fa-fonticons:before { - content: "\f280"; -} -.fa-reddit-alien:before { - content: "\f281"; -} -.fa-edge:before { - content: "\f282"; -} -.fa-credit-card-alt:before { - content: "\f283"; -} -.fa-codiepie:before { - content: "\f284"; -} -.fa-modx:before { - content: "\f285"; -} -.fa-fort-awesome:before { - content: "\f286"; -} -.fa-usb:before { - content: "\f287"; -} -.fa-product-hunt:before { - content: "\f288"; -} -.fa-mixcloud:before { - content: "\f289"; -} -.fa-scribd:before { - content: "\f28a"; -} -.fa-pause-circle:before { - content: "\f28b"; -} -.fa-pause-circle-o:before { - content: "\f28c"; -} -.fa-stop-circle:before { - content: "\f28d"; -} -.fa-stop-circle-o:before { - content: "\f28e"; -} -.fa-shopping-bag:before { - content: "\f290"; -} -.fa-shopping-basket:before { - content: "\f291"; -} -.fa-hashtag:before { - content: "\f292"; -} -.fa-bluetooth:before { - content: "\f293"; -} -.fa-bluetooth-b:before { - content: "\f294"; -} -.fa-percent:before { - content: "\f295"; -} -.fa-gitlab:before { - content: "\f296"; -} -.fa-wpbeginner:before { - content: "\f297"; -} -.fa-wpforms:before { - content: "\f298"; -} -.fa-envira:before { - content: "\f299"; -} -.fa-universal-access:before { - content: "\f29a"; -} -.fa-wheelchair-alt:before { - content: "\f29b"; -} -.fa-question-circle-o:before { - content: "\f29c"; -} -.fa-blind:before { - content: "\f29d"; -} -.fa-audio-description:before { - content: "\f29e"; -} -.fa-volume-control-phone:before { - content: "\f2a0"; -} -.fa-braille:before { - content: "\f2a1"; -} -.fa-assistive-listening-systems:before { - content: "\f2a2"; -} -.fa-asl-interpreting:before, -.fa-american-sign-language-interpreting:before { - content: "\f2a3"; -} -.fa-deafness:before, -.fa-hard-of-hearing:before, -.fa-deaf:before { - content: "\f2a4"; -} -.fa-glide:before { - content: "\f2a5"; -} -.fa-glide-g:before { - content: "\f2a6"; -} -.fa-signing:before, -.fa-sign-language:before { - content: "\f2a7"; -} -.fa-low-vision:before { - content: "\f2a8"; -} -.fa-viadeo:before { - content: "\f2a9"; -} -.fa-viadeo-square:before { - content: "\f2aa"; -} -.fa-snapchat:before { - content: "\f2ab"; -} -.fa-snapchat-ghost:before { - content: "\f2ac"; -} -.fa-snapchat-square:before { - content: "\f2ad"; -} -.fa-pied-piper:before { - content: "\f2ae"; -} -.fa-first-order:before { - content: "\f2b0"; -} -.fa-yoast:before { - content: "\f2b1"; -} -.fa-themeisle:before { - content: "\f2b2"; -} -.fa-google-plus-circle:before, -.fa-google-plus-official:before { - content: "\f2b3"; -} -.fa-fa:before, -.fa-font-awesome:before { - content: "\f2b4"; -} -.fa-handshake-o:before { - content: "\f2b5"; -} -.fa-envelope-open:before { - content: "\f2b6"; -} -.fa-envelope-open-o:before { - content: "\f2b7"; -} -.fa-linode:before { - content: "\f2b8"; -} -.fa-address-book:before { - content: "\f2b9"; -} -.fa-address-book-o:before { - content: "\f2ba"; -} -.fa-vcard:before, -.fa-address-card:before { - content: "\f2bb"; -} -.fa-vcard-o:before, -.fa-address-card-o:before { - content: "\f2bc"; -} -.fa-user-circle:before { - content: "\f2bd"; -} -.fa-user-circle-o:before { - content: "\f2be"; -} -.fa-user-o:before { - content: "\f2c0"; -} -.fa-id-badge:before { - content: "\f2c1"; -} -.fa-drivers-license:before, -.fa-id-card:before { - content: "\f2c2"; -} -.fa-drivers-license-o:before, -.fa-id-card-o:before { - content: "\f2c3"; -} -.fa-quora:before { - content: "\f2c4"; -} -.fa-free-code-camp:before { - content: "\f2c5"; -} -.fa-telegram:before { - content: "\f2c6"; -} -.fa-thermometer-4:before, -.fa-thermometer:before, -.fa-thermometer-full:before { - content: "\f2c7"; -} -.fa-thermometer-3:before, -.fa-thermometer-three-quarters:before { - content: "\f2c8"; -} -.fa-thermometer-2:before, -.fa-thermometer-half:before { - content: "\f2c9"; -} -.fa-thermometer-1:before, -.fa-thermometer-quarter:before { - content: "\f2ca"; -} -.fa-thermometer-0:before, -.fa-thermometer-empty:before { - content: "\f2cb"; -} -.fa-shower:before { - content: "\f2cc"; -} -.fa-bathtub:before, -.fa-s15:before, -.fa-bath:before { - content: "\f2cd"; -} -.fa-podcast:before { - content: "\f2ce"; -} -.fa-window-maximize:before { - content: "\f2d0"; -} -.fa-window-minimize:before { - content: "\f2d1"; -} -.fa-window-restore:before { - content: "\f2d2"; -} -.fa-times-rectangle:before, -.fa-window-close:before { - content: "\f2d3"; -} -.fa-times-rectangle-o:before, -.fa-window-close-o:before { - content: "\f2d4"; -} -.fa-bandcamp:before { - content: "\f2d5"; -} -.fa-grav:before { - content: "\f2d6"; -} -.fa-etsy:before { - content: "\f2d7"; -} -.fa-imdb:before { - content: "\f2d8"; -} -.fa-ravelry:before { - content: "\f2d9"; -} -.fa-eercast:before { - content: "\f2da"; -} -.fa-microchip:before { - content: "\f2db"; -} -.fa-snowflake-o:before { - content: "\f2dc"; -} -.fa-superpowers:before { - content: "\f2dd"; -} -.fa-wpexplorer:before { - content: "\f2de"; -} -.fa-meetup:before { - content: "\f2e0"; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -/*! -* -* IPython base -* -*/ -.modal.fade .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} -code { - color: #000; -} -pre { - font-size: inherit; - line-height: inherit; -} -label { - font-weight: normal; -} -/* Make the page background atleast 100% the height of the view port */ -/* Make the page itself atleast 70% the height of the view port */ -.border-box-sizing { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -.corner-all { - border-radius: 2px; -} -.no-padding { - padding: 0px; -} -/* Flexible box model classes */ -/* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */ -/* This file is a compatability layer. It allows the usage of flexible box -model layouts accross multiple browsers, including older browsers. The newest, -universal implementation of the flexible box model is used when available (see -`Modern browsers` comments below). Browsers that are known to implement this -new spec completely include: - - Firefox 28.0+ - Chrome 29.0+ - Internet Explorer 11+ - Opera 17.0+ - -Browsers not listed, including Safari, are supported via the styling under the -`Old browsers` comments below. -*/ -.hbox { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; -} -.hbox > * { - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; -} -.vbox { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; -} -.vbox > * { - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; -} -.hbox.reverse, -.vbox.reverse, -.reverse { - /* Old browsers */ - -webkit-box-direction: reverse; - -moz-box-direction: reverse; - box-direction: reverse; - /* Modern browsers */ - flex-direction: row-reverse; -} -.hbox.box-flex0, -.vbox.box-flex0, -.box-flex0 { - /* Old browsers */ - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - /* Modern browsers */ - flex: none; - width: auto; -} -.hbox.box-flex1, -.vbox.box-flex1, -.box-flex1 { - /* Old browsers */ - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - /* Modern browsers */ - flex: 1; -} -.hbox.box-flex, -.vbox.box-flex, -.box-flex { - /* Old browsers */ - /* Old browsers */ - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - /* Modern browsers */ - flex: 1; -} -.hbox.box-flex2, -.vbox.box-flex2, -.box-flex2 { - /* Old browsers */ - -webkit-box-flex: 2; - -moz-box-flex: 2; - box-flex: 2; - /* Modern browsers */ - flex: 2; -} -.box-group1 { - /* Deprecated */ - -webkit-box-flex-group: 1; - -moz-box-flex-group: 1; - box-flex-group: 1; -} -.box-group2 { - /* Deprecated */ - -webkit-box-flex-group: 2; - -moz-box-flex-group: 2; - box-flex-group: 2; -} -.hbox.start, -.vbox.start, -.start { - /* Old browsers */ - -webkit-box-pack: start; - -moz-box-pack: start; - box-pack: start; - /* Modern browsers */ - justify-content: flex-start; -} -.hbox.end, -.vbox.end, -.end { - /* Old browsers */ - -webkit-box-pack: end; - -moz-box-pack: end; - box-pack: end; - /* Modern browsers */ - justify-content: flex-end; -} -.hbox.center, -.vbox.center, -.center { - /* Old browsers */ - -webkit-box-pack: center; - -moz-box-pack: center; - box-pack: center; - /* Modern browsers */ - justify-content: center; -} -.hbox.baseline, -.vbox.baseline, -.baseline { - /* Old browsers */ - -webkit-box-pack: baseline; - -moz-box-pack: baseline; - box-pack: baseline; - /* Modern browsers */ - justify-content: baseline; -} -.hbox.stretch, -.vbox.stretch, -.stretch { - /* Old browsers */ - -webkit-box-pack: stretch; - -moz-box-pack: stretch; - box-pack: stretch; - /* Modern browsers */ - justify-content: stretch; -} -.hbox.align-start, -.vbox.align-start, -.align-start { - /* Old browsers */ - -webkit-box-align: start; - -moz-box-align: start; - box-align: start; - /* Modern browsers */ - align-items: flex-start; -} -.hbox.align-end, -.vbox.align-end, -.align-end { - /* Old browsers */ - -webkit-box-align: end; - -moz-box-align: end; - box-align: end; - /* Modern browsers */ - align-items: flex-end; -} -.hbox.align-center, -.vbox.align-center, -.align-center { - /* Old browsers */ - -webkit-box-align: center; - -moz-box-align: center; - box-align: center; - /* Modern browsers */ - align-items: center; -} -.hbox.align-baseline, -.vbox.align-baseline, -.align-baseline { - /* Old browsers */ - -webkit-box-align: baseline; - -moz-box-align: baseline; - box-align: baseline; - /* Modern browsers */ - align-items: baseline; -} -.hbox.align-stretch, -.vbox.align-stretch, -.align-stretch { - /* Old browsers */ - -webkit-box-align: stretch; - -moz-box-align: stretch; - box-align: stretch; - /* Modern browsers */ - align-items: stretch; -} -div.error { - margin: 2em; - text-align: center; -} -div.error > h1 { - font-size: 500%; - line-height: normal; -} -div.error > p { - font-size: 200%; - line-height: normal; -} -div.traceback-wrapper { - text-align: left; - max-width: 800px; - margin: auto; -} -div.traceback-wrapper pre.traceback { - max-height: 600px; - overflow: auto; -} -/** - * Primary styles - * - * Author: Jupyter Development Team - */ -body { - background-color: #fff; - /* This makes sure that the body covers the entire window and needs to - be in a different element than the display: box in wrapper below */ - position: absolute; - left: 0px; - right: 0px; - top: 0px; - bottom: 0px; - overflow: visible; -} -body > #header { - /* Initially hidden to prevent FLOUC */ - display: none; - background-color: #fff; - /* Display over codemirror */ - position: relative; - z-index: 100; -} -body > #header #header-container { - display: flex; - flex-direction: row; - justify-content: space-between; - padding: 5px; - padding-bottom: 5px; - padding-top: 5px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -body > #header .header-bar { - width: 100%; - height: 1px; - background: #e7e7e7; - margin-bottom: -1px; -} -@media print { - body > #header { - display: none !important; - } -} -#header-spacer { - width: 100%; - visibility: hidden; -} -@media print { - #header-spacer { - display: none; - } -} -#ipython_notebook { - padding-left: 0px; - padding-top: 1px; - padding-bottom: 1px; -} -[dir="rtl"] #ipython_notebook { - margin-right: 10px; - margin-left: 0; -} -[dir="rtl"] #ipython_notebook.pull-left { - float: right !important; - float: right; -} -.flex-spacer { - flex: 1; -} -#noscript { - width: auto; - padding-top: 16px; - padding-bottom: 16px; - text-align: center; - font-size: 22px; - color: red; - font-weight: bold; -} -#ipython_notebook img { - height: 28px; -} -#site { - width: 100%; - display: none; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - overflow: auto; -} -@media print { - #site { - height: auto !important; - } -} -/* Smaller buttons */ -.ui-button .ui-button-text { - padding: 0.2em 0.8em; - font-size: 77%; -} -input.ui-button { - padding: 0.3em 0.9em; -} -span#kernel_logo_widget { - margin: 0 10px; -} -span#login_widget { - float: right; -} -[dir="rtl"] span#login_widget { - float: left; -} -span#login_widget > .button, -#logout { - color: #333; - background-color: #fff; - border-color: #ccc; -} -span#login_widget > .button:focus, -#logout:focus, -span#login_widget > .button.focus, -#logout.focus { - color: #333; - background-color: #e6e6e6; - border-color: #8c8c8c; -} -span#login_widget > .button:hover, -#logout:hover { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -span#login_widget > .button:active, -#logout:active, -span#login_widget > .button.active, -#logout.active, -.open > .dropdown-togglespan#login_widget > .button, -.open > .dropdown-toggle#logout { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -span#login_widget > .button:active:hover, -#logout:active:hover, -span#login_widget > .button.active:hover, -#logout.active:hover, -.open > .dropdown-togglespan#login_widget > .button:hover, -.open > .dropdown-toggle#logout:hover, -span#login_widget > .button:active:focus, -#logout:active:focus, -span#login_widget > .button.active:focus, -#logout.active:focus, -.open > .dropdown-togglespan#login_widget > .button:focus, -.open > .dropdown-toggle#logout:focus, -span#login_widget > .button:active.focus, -#logout:active.focus, -span#login_widget > .button.active.focus, -#logout.active.focus, -.open > .dropdown-togglespan#login_widget > .button.focus, -.open > .dropdown-toggle#logout.focus { - color: #333; - background-color: #d4d4d4; - border-color: #8c8c8c; -} -span#login_widget > .button:active, -#logout:active, -span#login_widget > .button.active, -#logout.active, -.open > .dropdown-togglespan#login_widget > .button, -.open > .dropdown-toggle#logout { - background-image: none; -} -span#login_widget > .button.disabled:hover, -#logout.disabled:hover, -span#login_widget > .button[disabled]:hover, -#logout[disabled]:hover, -fieldset[disabled] span#login_widget > .button:hover, -fieldset[disabled] #logout:hover, -span#login_widget > .button.disabled:focus, -#logout.disabled:focus, -span#login_widget > .button[disabled]:focus, -#logout[disabled]:focus, -fieldset[disabled] span#login_widget > .button:focus, -fieldset[disabled] #logout:focus, -span#login_widget > .button.disabled.focus, -#logout.disabled.focus, -span#login_widget > .button[disabled].focus, -#logout[disabled].focus, -fieldset[disabled] span#login_widget > .button.focus, -fieldset[disabled] #logout.focus { - background-color: #fff; - border-color: #ccc; -} -span#login_widget > .button .badge, -#logout .badge { - color: #fff; - background-color: #333; -} -.nav-header { - text-transform: none; -} -#header > span { - margin-top: 10px; -} -.modal_stretch .modal-dialog { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - min-height: 80vh; -} -.modal_stretch .modal-dialog .modal-body { - max-height: calc(100vh - 200px); - overflow: auto; - flex: 1; -} -.modal-header { - cursor: move; -} -@media (min-width: 768px) { - .modal .modal-dialog { - width: 700px; - } -} -@media (min-width: 768px) { - select.form-control { - margin-left: 12px; - margin-right: 12px; - } -} -/*! -* -* IPython auth -* -*/ -.center-nav { - display: inline-block; - margin-bottom: -4px; -} -[dir="rtl"] .center-nav form.pull-left { - float: right !important; - float: right; -} -[dir="rtl"] .center-nav .navbar-text { - float: right; -} -[dir="rtl"] .navbar-inner { - text-align: right; -} -[dir="rtl"] div.text-left { - text-align: right; -} -/*! -* -* IPython tree view -* -*/ -/* We need an invisible input field on top of the sentense*/ -/* "Drag file onto the list ..." */ -.alternate_upload { - background-color: none; - display: inline; -} -.alternate_upload.form { - padding: 0; - margin: 0; -} -.alternate_upload input.fileinput { - position: absolute; - display: block; - width: 100%; - height: 100%; - overflow: hidden; - cursor: pointer; - opacity: 0; - z-index: 2; -} -.alternate_upload .btn-xs > input.fileinput { - margin: -1px -5px; -} -.alternate_upload .btn-upload { - position: relative; - height: 22px; -} -::-webkit-file-upload-button { - cursor: pointer; -} -/** - * Primary styles - * - * Author: Jupyter Development Team - */ -ul#tabs { - margin-bottom: 4px; -} -ul#tabs a { - padding-top: 6px; - padding-bottom: 4px; -} -[dir="rtl"] ul#tabs.nav-tabs > li { - float: right; -} -[dir="rtl"] ul#tabs.nav.nav-tabs { - padding-right: 0; -} -ul.breadcrumb a:focus, -ul.breadcrumb a:hover { - text-decoration: none; -} -ul.breadcrumb i.icon-home { - font-size: 16px; - margin-right: 4px; -} -ul.breadcrumb span { - color: #5e5e5e; -} -.list_toolbar { - padding: 4px 0 4px 0; - vertical-align: middle; -} -.list_toolbar .tree-buttons { - padding-top: 1px; -} -[dir="rtl"] .list_toolbar .tree-buttons .pull-right { - float: left !important; - float: left; -} -[dir="rtl"] .list_toolbar .col-sm-4, -[dir="rtl"] .list_toolbar .col-sm-8 { - float: right; -} -.dynamic-buttons { - padding-top: 3px; - display: inline-block; -} -.list_toolbar [class*="span"] { - min-height: 24px; -} -.list_header { - font-weight: bold; - background-color: #EEE; -} -.list_placeholder { - font-weight: bold; - padding-top: 4px; - padding-bottom: 4px; - padding-left: 7px; - padding-right: 7px; -} -.list_container { - margin-top: 4px; - margin-bottom: 20px; - border: 1px solid #ddd; - border-radius: 2px; -} -.list_container > div { - border-bottom: 1px solid #ddd; -} -.list_container > div:hover .list-item { - background-color: red; -} -.list_container > div:last-child { - border: none; -} -.list_item:hover .list_item { - background-color: #ddd; -} -.list_item a { - text-decoration: none; -} -.list_item:hover { - background-color: #fafafa; -} -.list_header > div, -.list_item > div { - padding-top: 4px; - padding-bottom: 4px; - padding-left: 7px; - padding-right: 7px; - line-height: 22px; -} -.list_header > div input, -.list_item > div input { - margin-right: 7px; - margin-left: 14px; - vertical-align: text-bottom; - line-height: 22px; - position: relative; - top: -1px; -} -.list_header > div .item_link, -.list_item > div .item_link { - margin-left: -1px; - vertical-align: baseline; - line-height: 22px; -} -[dir="rtl"] .list_item > div input { - margin-right: 0; -} -.new-file input[type=checkbox] { - visibility: hidden; -} -.item_name { - line-height: 22px; - height: 24px; -} -.item_icon { - font-size: 14px; - color: #5e5e5e; - margin-right: 7px; - margin-left: 7px; - line-height: 22px; - vertical-align: baseline; -} -.item_modified { - margin-right: 7px; - margin-left: 7px; -} -[dir="rtl"] .item_modified.pull-right { - float: left !important; - float: left; -} -.item_buttons { - line-height: 1em; - margin-left: -5px; -} -.item_buttons .btn, -.item_buttons .btn-group, -.item_buttons .input-group { - float: left; -} -.item_buttons > .btn, -.item_buttons > .btn-group, -.item_buttons > .input-group { - margin-left: 5px; -} -.item_buttons .btn { - min-width: 13ex; -} -.item_buttons .running-indicator { - padding-top: 4px; - color: #5cb85c; -} -.item_buttons .kernel-name { - padding-top: 4px; - color: #5bc0de; - margin-right: 7px; - float: left; -} -[dir="rtl"] .item_buttons.pull-right { - float: left !important; - float: left; -} -[dir="rtl"] .item_buttons .kernel-name { - margin-left: 7px; - float: right; -} -.toolbar_info { - height: 24px; - line-height: 24px; -} -.list_item input:not([type=checkbox]) { - padding-top: 3px; - padding-bottom: 3px; - height: 22px; - line-height: 14px; - margin: 0px; -} -.highlight_text { - color: blue; -} -#project_name { - display: inline-block; - padding-left: 7px; - margin-left: -2px; -} -#project_name > .breadcrumb { - padding: 0px; - margin-bottom: 0px; - background-color: transparent; - font-weight: bold; -} -.sort_button { - display: inline-block; - padding-left: 7px; -} -[dir="rtl"] .sort_button.pull-right { - float: left !important; - float: left; -} -#tree-selector { - padding-right: 0px; -} -#button-select-all { - min-width: 50px; -} -[dir="rtl"] #button-select-all.btn { - float: right ; -} -#select-all { - margin-left: 7px; - margin-right: 2px; - margin-top: 2px; - height: 16px; -} -[dir="rtl"] #select-all.pull-left { - float: right !important; - float: right; -} -.menu_icon { - margin-right: 2px; -} -.tab-content .row { - margin-left: 0px; - margin-right: 0px; -} -.folder_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f114"; -} -.folder_icon:before.fa-pull-left { - margin-right: .3em; -} -.folder_icon:before.fa-pull-right { - margin-left: .3em; -} -.folder_icon:before.pull-left { - margin-right: .3em; -} -.folder_icon:before.pull-right { - margin-left: .3em; -} -.notebook_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f02d"; - position: relative; - top: -1px; -} -.notebook_icon:before.fa-pull-left { - margin-right: .3em; -} -.notebook_icon:before.fa-pull-right { - margin-left: .3em; -} -.notebook_icon:before.pull-left { - margin-right: .3em; -} -.notebook_icon:before.pull-right { - margin-left: .3em; -} -.running_notebook_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f02d"; - position: relative; - top: -1px; - color: #5cb85c; -} -.running_notebook_icon:before.fa-pull-left { - margin-right: .3em; -} -.running_notebook_icon:before.fa-pull-right { - margin-left: .3em; -} -.running_notebook_icon:before.pull-left { - margin-right: .3em; -} -.running_notebook_icon:before.pull-right { - margin-left: .3em; -} -.file_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f016"; - position: relative; - top: -2px; -} -.file_icon:before.fa-pull-left { - margin-right: .3em; -} -.file_icon:before.fa-pull-right { - margin-left: .3em; -} -.file_icon:before.pull-left { - margin-right: .3em; -} -.file_icon:before.pull-right { - margin-left: .3em; -} -#notebook_toolbar .pull-right { - padding-top: 0px; - margin-right: -1px; -} -ul#new-menu { - left: auto; - right: 0; -} -#new-menu .dropdown-header { - font-size: 10px; - border-bottom: 1px solid #e5e5e5; - padding: 0 0 3px; - margin: -3px 20px 0; -} -.kernel-menu-icon { - padding-right: 12px; - width: 24px; - content: "\f096"; -} -.kernel-menu-icon:before { - content: "\f096"; -} -.kernel-menu-icon-current:before { - content: "\f00c"; -} -#tab_content { - padding-top: 20px; -} -#running .panel-group .panel { - margin-top: 3px; - margin-bottom: 1em; -} -#running .panel-group .panel .panel-heading { - background-color: #EEE; - padding-top: 4px; - padding-bottom: 4px; - padding-left: 7px; - padding-right: 7px; - line-height: 22px; -} -#running .panel-group .panel .panel-heading a:focus, -#running .panel-group .panel .panel-heading a:hover { - text-decoration: none; -} -#running .panel-group .panel .panel-body { - padding: 0px; -} -#running .panel-group .panel .panel-body .list_container { - margin-top: 0px; - margin-bottom: 0px; - border: 0px; - border-radius: 0px; -} -#running .panel-group .panel .panel-body .list_container .list_item { - border-bottom: 1px solid #ddd; -} -#running .panel-group .panel .panel-body .list_container .list_item:last-child { - border-bottom: 0px; -} -.delete-button { - display: none; -} -.duplicate-button { - display: none; -} -.rename-button { - display: none; -} -.move-button { - display: none; -} -.download-button { - display: none; -} -.shutdown-button { - display: none; -} -.dynamic-instructions { - display: inline-block; - padding-top: 4px; -} -/*! -* -* IPython text editor webapp -* -*/ -.selected-keymap i.fa { - padding: 0px 5px; -} -.selected-keymap i.fa:before { - content: "\f00c"; -} -#mode-menu { - overflow: auto; - max-height: 20em; -} -.edit_app #header { - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); -} -.edit_app #menubar .navbar { - /* Use a negative 1 bottom margin, so the border overlaps the border of the - header */ - margin-bottom: -1px; -} -.dirty-indicator { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - width: 20px; -} -.dirty-indicator.fa-pull-left { - margin-right: .3em; -} -.dirty-indicator.fa-pull-right { - margin-left: .3em; -} -.dirty-indicator.pull-left { - margin-right: .3em; -} -.dirty-indicator.pull-right { - margin-left: .3em; -} -.dirty-indicator-dirty { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - width: 20px; -} -.dirty-indicator-dirty.fa-pull-left { - margin-right: .3em; -} -.dirty-indicator-dirty.fa-pull-right { - margin-left: .3em; -} -.dirty-indicator-dirty.pull-left { - margin-right: .3em; -} -.dirty-indicator-dirty.pull-right { - margin-left: .3em; -} -.dirty-indicator-clean { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - width: 20px; -} -.dirty-indicator-clean.fa-pull-left { - margin-right: .3em; -} -.dirty-indicator-clean.fa-pull-right { - margin-left: .3em; -} -.dirty-indicator-clean.pull-left { - margin-right: .3em; -} -.dirty-indicator-clean.pull-right { - margin-left: .3em; -} -.dirty-indicator-clean:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f00c"; -} -.dirty-indicator-clean:before.fa-pull-left { - margin-right: .3em; -} -.dirty-indicator-clean:before.fa-pull-right { - margin-left: .3em; -} -.dirty-indicator-clean:before.pull-left { - margin-right: .3em; -} -.dirty-indicator-clean:before.pull-right { - margin-left: .3em; -} -#filename { - font-size: 16pt; - display: table; - padding: 0px 5px; -} -#current-mode { - padding-left: 5px; - padding-right: 5px; -} -#texteditor-backdrop { - padding-top: 20px; - padding-bottom: 20px; -} -@media not print { - #texteditor-backdrop { - background-color: #EEE; - } -} -@media print { - #texteditor-backdrop #texteditor-container .CodeMirror-gutter, - #texteditor-backdrop #texteditor-container .CodeMirror-gutters { - background-color: #fff; - } -} -@media not print { - #texteditor-backdrop #texteditor-container .CodeMirror-gutter, - #texteditor-backdrop #texteditor-container .CodeMirror-gutters { - background-color: #fff; - } -} -@media not print { - #texteditor-backdrop #texteditor-container { - padding: 0px; - background-color: #fff; - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - } -} -.CodeMirror-dialog { - background-color: #fff; -} -/*! -* -* IPython notebook -* -*/ -/* CSS font colors for translated ANSI escape sequences */ -/* The color values are a mix of - http://www.xcolors.net/dl/baskerville-ivorylight and - http://www.xcolors.net/dl/euphrasia */ -.ansi-black-fg { - color: #3E424D; -} -.ansi-black-bg { - background-color: #3E424D; -} -.ansi-black-intense-fg { - color: #282C36; -} -.ansi-black-intense-bg { - background-color: #282C36; -} -.ansi-red-fg { - color: #E75C58; -} -.ansi-red-bg { - background-color: #E75C58; -} -.ansi-red-intense-fg { - color: #B22B31; -} -.ansi-red-intense-bg { - background-color: #B22B31; -} -.ansi-green-fg { - color: #00A250; -} -.ansi-green-bg { - background-color: #00A250; -} -.ansi-green-intense-fg { - color: #007427; -} -.ansi-green-intense-bg { - background-color: #007427; -} -.ansi-yellow-fg { - color: #DDB62B; -} -.ansi-yellow-bg { - background-color: #DDB62B; -} -.ansi-yellow-intense-fg { - color: #B27D12; -} -.ansi-yellow-intense-bg { - background-color: #B27D12; -} -.ansi-blue-fg { - color: #208FFB; -} -.ansi-blue-bg { - background-color: #208FFB; -} -.ansi-blue-intense-fg { - color: #0065CA; -} -.ansi-blue-intense-bg { - background-color: #0065CA; -} -.ansi-magenta-fg { - color: #D160C4; -} -.ansi-magenta-bg { - background-color: #D160C4; -} -.ansi-magenta-intense-fg { - color: #A03196; -} -.ansi-magenta-intense-bg { - background-color: #A03196; -} -.ansi-cyan-fg { - color: #60C6C8; -} -.ansi-cyan-bg { - background-color: #60C6C8; -} -.ansi-cyan-intense-fg { - color: #258F8F; -} -.ansi-cyan-intense-bg { - background-color: #258F8F; -} -.ansi-white-fg { - color: #C5C1B4; -} -.ansi-white-bg { - background-color: #C5C1B4; -} -.ansi-white-intense-fg { - color: #A1A6B2; -} -.ansi-white-intense-bg { - background-color: #A1A6B2; -} -.ansi-default-inverse-fg { - color: #FFFFFF; -} -.ansi-default-inverse-bg { - background-color: #000000; -} -.ansi-bold { - font-weight: bold; -} -.ansi-underline { - text-decoration: underline; -} -/* The following styles are deprecated an will be removed in a future version */ -.ansibold { - font-weight: bold; -} -.ansi-inverse { - outline: 0.5px dotted; -} -/* use dark versions for foreground, to improve visibility */ -.ansiblack { - color: black; -} -.ansired { - color: darkred; -} -.ansigreen { - color: darkgreen; -} -.ansiyellow { - color: #c4a000; -} -.ansiblue { - color: darkblue; -} -.ansipurple { - color: darkviolet; -} -.ansicyan { - color: steelblue; -} -.ansigray { - color: gray; -} -/* and light for background, for the same reason */ -.ansibgblack { - background-color: black; -} -.ansibgred { - background-color: red; -} -.ansibggreen { - background-color: green; -} -.ansibgyellow { - background-color: yellow; -} -.ansibgblue { - background-color: blue; -} -.ansibgpurple { - background-color: magenta; -} -.ansibgcyan { - background-color: cyan; -} -.ansibggray { - background-color: gray; -} -div.cell { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - border-radius: 2px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - border-width: 1px; - border-style: solid; - border-color: transparent; - width: 100%; - padding: 5px; - /* This acts as a spacer between cells, that is outside the border */ - margin: 0px; - outline: none; - position: relative; - overflow: visible; -} -div.cell:before { - position: absolute; - display: block; - top: -1px; - left: -1px; - width: 5px; - height: calc(100% + 2px); - content: ''; - background: transparent; -} -div.cell.jupyter-soft-selected { - border-left-color: #E3F2FD; - border-left-width: 1px; - padding-left: 5px; - border-right-color: #E3F2FD; - border-right-width: 1px; - background: #E3F2FD; -} -@media print { - div.cell.jupyter-soft-selected { - border-color: transparent; - } -} -div.cell.selected, -div.cell.selected.jupyter-soft-selected { - border-color: #ababab; -} -div.cell.selected:before, -div.cell.selected.jupyter-soft-selected:before { - position: absolute; - display: block; - top: -1px; - left: -1px; - width: 5px; - height: calc(100% + 2px); - content: ''; - background: #42A5F5; -} -@media print { - div.cell.selected, - div.cell.selected.jupyter-soft-selected { - border-color: transparent; - } -} -.edit_mode div.cell.selected { - border-color: #66BB6A; -} -.edit_mode div.cell.selected:before { - position: absolute; - display: block; - top: -1px; - left: -1px; - width: 5px; - height: calc(100% + 2px); - content: ''; - background: #66BB6A; -} -@media print { - .edit_mode div.cell.selected { - border-color: transparent; - } -} -.prompt { - /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ - min-width: 14ex; - /* This padding is tuned to match the padding on the CodeMirror editor. */ - padding: 0.4em; - margin: 0px; - font-family: monospace; - text-align: right; - /* This has to match that of the the CodeMirror class line-height below */ - line-height: 1.21429em; - /* Don't highlight prompt number selection */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - /* Use default cursor */ - cursor: default; -} -@media (max-width: 540px) { - .prompt { - text-align: left; - } -} -div.inner_cell { - min-width: 0; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - /* Old browsers */ - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - /* Modern browsers */ - flex: 1; -} -/* input_area and input_prompt must match in top border and margin for alignment */ -div.input_area { - border: 1px solid #cfcfcf; - border-radius: 2px; - background: #f7f7f7; - line-height: 1.21429em; -} -/* This is needed so that empty prompt areas can collapse to zero height when there - is no content in the output_subarea and the prompt. The main purpose of this is - to make sure that empty JavaScript output_subareas have no height. */ -div.prompt:empty { - padding-top: 0; - padding-bottom: 0; -} -div.unrecognized_cell { - padding: 5px 5px 5px 0px; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; -} -div.unrecognized_cell .inner_cell { - border-radius: 2px; - padding: 5px; - font-weight: bold; - color: red; - border: 1px solid #cfcfcf; - background: #eaeaea; -} -div.unrecognized_cell .inner_cell a { - color: inherit; - text-decoration: none; -} -div.unrecognized_cell .inner_cell a:hover { - color: inherit; - text-decoration: none; -} -@media (max-width: 540px) { - div.unrecognized_cell > div.prompt { - display: none; - } -} -div.code_cell { - /* avoid page breaking on code cells when printing */ -} -@media print { - div.code_cell { - page-break-inside: avoid; - } -} -/* any special styling for code cells that are currently running goes here */ -div.input { - page-break-inside: avoid; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; -} -@media (max-width: 540px) { - div.input { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - } -} -/* input_area and input_prompt must match in top border and margin for alignment */ -div.input_prompt { - color: #303F9F; - border-top: 1px solid transparent; -} -div.input_area > div.highlight { - margin: 0.4em; - border: none; - padding: 0px; - background-color: transparent; -} -div.input_area > div.highlight > pre { - margin: 0px; - border: none; - padding: 0px; - background-color: transparent; -} -/* The following gets added to the if it is detected that the user has a - * monospace font with inconsistent normal/bold/italic height. See - * notebookmain.js. Such fonts will have keywords vertically offset with - * respect to the rest of the text. The user should select a better font. - * See: https://github.com/ipython/ipython/issues/1503 - * - * .CodeMirror span { - * vertical-align: bottom; - * } - */ -.CodeMirror { - line-height: 1.21429em; - /* Changed from 1em to our global default */ - font-size: 14px; - height: auto; - /* Changed to auto to autogrow */ - background: none; - /* Changed from white to allow our bg to show through */ -} -.CodeMirror-scroll { - /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ - /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ - overflow-y: hidden; - overflow-x: auto; -} -.CodeMirror-lines { - /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */ - /* we have set a different line-height and want this to scale with that. */ - /* Note that this should set vertical padding only, since CodeMirror assumes - that horizontal padding will be set on CodeMirror pre */ - padding: 0.4em 0; -} -.CodeMirror-linenumber { - padding: 0 8px 0 4px; -} -.CodeMirror-gutters { - border-bottom-left-radius: 2px; - border-top-left-radius: 2px; -} -.CodeMirror pre { - /* In CM3 this went to 4px from 0 in CM2. This sets horizontal padding only, - use .CodeMirror-lines for vertical */ - padding: 0 0.4em; - border: 0; - border-radius: 0; -} -.CodeMirror-cursor { - border-left: 1.4px solid black; -} -@media screen and (min-width: 2138px) and (max-width: 4319px) { - .CodeMirror-cursor { - border-left: 2px solid black; - } -} -@media screen and (min-width: 4320px) { - .CodeMirror-cursor { - border-left: 4px solid black; - } -} -/* - -Original style from softwaremaniacs.org (c) Ivan Sagalaev -Adapted from GitHub theme - -*/ -.highlight-base { - color: #000; -} -.highlight-variable { - color: #000; -} -.highlight-variable-2 { - color: #1a1a1a; -} -.highlight-variable-3 { - color: #333333; -} -.highlight-string { - color: #BA2121; -} -.highlight-comment { - color: #408080; - font-style: italic; -} -.highlight-number { - color: #080; -} -.highlight-atom { - color: #88F; -} -.highlight-keyword { - color: #008000; - font-weight: bold; -} -.highlight-builtin { - color: #008000; -} -.highlight-error { - color: #f00; -} -.highlight-operator { - color: #AA22FF; - font-weight: bold; -} -.highlight-meta { - color: #AA22FF; -} -/* previously not defined, copying from default codemirror */ -.highlight-def { - color: #00f; -} -.highlight-string-2 { - color: #f50; -} -.highlight-qualifier { - color: #555; -} -.highlight-bracket { - color: #997; -} -.highlight-tag { - color: #170; -} -.highlight-attribute { - color: #00c; -} -.highlight-header { - color: blue; -} -.highlight-quote { - color: #090; -} -.highlight-link { - color: #00c; -} -/* apply the same style to codemirror */ -.cm-s-ipython span.cm-keyword { - color: #008000; - font-weight: bold; -} -.cm-s-ipython span.cm-atom { - color: #88F; -} -.cm-s-ipython span.cm-number { - color: #080; -} -.cm-s-ipython span.cm-def { - color: #00f; -} -.cm-s-ipython span.cm-variable { - color: #000; -} -.cm-s-ipython span.cm-operator { - color: #AA22FF; - font-weight: bold; -} -.cm-s-ipython span.cm-variable-2 { - color: #1a1a1a; -} -.cm-s-ipython span.cm-variable-3 { - color: #333333; -} -.cm-s-ipython span.cm-comment { - color: #408080; - font-style: italic; -} -.cm-s-ipython span.cm-string { - color: #BA2121; -} -.cm-s-ipython span.cm-string-2 { - color: #f50; -} -.cm-s-ipython span.cm-meta { - color: #AA22FF; -} -.cm-s-ipython span.cm-qualifier { - color: #555; -} -.cm-s-ipython span.cm-builtin { - color: #008000; -} -.cm-s-ipython span.cm-bracket { - color: #997; -} -.cm-s-ipython span.cm-tag { - color: #170; -} -.cm-s-ipython span.cm-attribute { - color: #00c; -} -.cm-s-ipython span.cm-header { - color: blue; -} -.cm-s-ipython span.cm-quote { - color: #090; -} -.cm-s-ipython span.cm-link { - color: #00c; -} -.cm-s-ipython span.cm-error { - color: #f00; -} -.cm-s-ipython span.cm-tab { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=); - background-position: right; - background-repeat: no-repeat; -} -div.output_wrapper { - /* this position must be relative to enable descendents to be absolute within it */ - position: relative; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - z-index: 1; -} -/* class for the output area when it should be height-limited */ -div.output_scroll { - /* ideally, this would be max-height, but FF barfs all over that */ - height: 24em; - /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */ - width: 100%; - overflow: auto; - border-radius: 2px; - -webkit-box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); - box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); - display: block; -} -/* output div while it is collapsed */ -div.output_collapsed { - margin: 0px; - padding: 0px; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; -} -div.out_prompt_overlay { - height: 100%; - padding: 0px 0.4em; - position: absolute; - border-radius: 2px; -} -div.out_prompt_overlay:hover { - /* use inner shadow to get border that is computed the same on WebKit/FF */ - -webkit-box-shadow: inset 0 0 1px #000; - box-shadow: inset 0 0 1px #000; - background: rgba(240, 240, 240, 0.5); -} -div.output_prompt { - color: #D84315; -} -/* This class is the outer container of all output sections. */ -div.output_area { - padding: 0px; - page-break-inside: avoid; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; -} -div.output_area .MathJax_Display { - text-align: left !important; -} -div.output_area .rendered_html table { - margin-left: 0; - margin-right: 0; -} -div.output_area .rendered_html img { - margin-left: 0; - margin-right: 0; -} -div.output_area img, -div.output_area svg { - max-width: 100%; - height: auto; -} -div.output_area img.unconfined, -div.output_area svg.unconfined { - max-width: none; -} -div.output_area .mglyph > img { - max-width: none; -} -/* This is needed to protect the pre formating from global settings such - as that of bootstrap */ -.output { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; -} -@media (max-width: 540px) { - div.output_area { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: vertical; - -moz-box-align: stretch; - display: box; - box-orient: vertical; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: column; - align-items: stretch; - } -} -div.output_area pre { - margin: 0; - padding: 1px 0 1px 0; - border: 0; - vertical-align: baseline; - color: black; - background-color: transparent; - border-radius: 0; -} -/* This class is for the output subarea inside the output_area and after - the prompt div. */ -div.output_subarea { - overflow-x: auto; - padding: 0.4em; - /* Old browsers */ - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - /* Modern browsers */ - flex: 1; - max-width: calc(100% - 14ex); -} -div.output_scroll div.output_subarea { - overflow-x: visible; -} -/* The rest of the output_* classes are for special styling of the different - output types */ -/* all text output has this class: */ -div.output_text { - text-align: left; - color: #000; - /* This has to match that of the the CodeMirror class line-height below */ - line-height: 1.21429em; -} -/* stdout/stderr are 'text' as well as 'stream', but execute_result/error are *not* streams */ -div.output_stderr { - background: #fdd; - /* very light red background for stderr */ -} -div.output_latex { - text-align: left; -} -/* Empty output_javascript divs should have no height */ -div.output_javascript:empty { - padding: 0; -} -.js-error { - color: darkred; -} -/* raw_input styles */ -div.raw_input_container { - line-height: 1.21429em; - padding-top: 5px; -} -pre.raw_input_prompt { - /* nothing needed here. */ -} -input.raw_input { - font-family: monospace; - font-size: inherit; - color: inherit; - width: auto; - /* make sure input baseline aligns with prompt */ - vertical-align: baseline; - /* padding + margin = 0.5em between prompt and cursor */ - padding: 0em 0.25em; - margin: 0em 0.25em; -} -input.raw_input:focus { - box-shadow: none; -} -p.p-space { - margin-bottom: 10px; -} -div.output_unrecognized { - padding: 5px; - font-weight: bold; - color: red; -} -div.output_unrecognized a { - color: inherit; - text-decoration: none; -} -div.output_unrecognized a:hover { - color: inherit; - text-decoration: none; -} -.rendered_html { - color: #000; - /* any extras will just be numbers: */ -} -.rendered_html em { - font-style: italic; -} -.rendered_html strong { - font-weight: bold; -} -.rendered_html u { - text-decoration: underline; -} -.rendered_html :link { - text-decoration: underline; -} -.rendered_html :visited { - text-decoration: underline; -} -.rendered_html h1 { - font-size: 185.7%; - margin: 1.08em 0 0 0; - font-weight: bold; - line-height: 1.0; -} -.rendered_html h2 { - font-size: 157.1%; - margin: 1.27em 0 0 0; - font-weight: bold; - line-height: 1.0; -} -.rendered_html h3 { - font-size: 128.6%; - margin: 1.55em 0 0 0; - font-weight: bold; - line-height: 1.0; -} -.rendered_html h4 { - font-size: 100%; - margin: 2em 0 0 0; - font-weight: bold; - line-height: 1.0; -} -.rendered_html h5 { - font-size: 100%; - margin: 2em 0 0 0; - font-weight: bold; - line-height: 1.0; - font-style: italic; -} -.rendered_html h6 { - font-size: 100%; - margin: 2em 0 0 0; - font-weight: bold; - line-height: 1.0; - font-style: italic; -} -.rendered_html h1:first-child { - margin-top: 0.538em; -} -.rendered_html h2:first-child { - margin-top: 0.636em; -} -.rendered_html h3:first-child { - margin-top: 0.777em; -} -.rendered_html h4:first-child { - margin-top: 1em; -} -.rendered_html h5:first-child { - margin-top: 1em; -} -.rendered_html h6:first-child { - margin-top: 1em; -} -.rendered_html ul:not(.list-inline), -.rendered_html ol:not(.list-inline) { - padding-left: 2em; -} -.rendered_html ul { - list-style: disc; -} -.rendered_html ul ul { - list-style: square; - margin-top: 0; -} -.rendered_html ul ul ul { - list-style: circle; -} -.rendered_html ol { - list-style: decimal; -} -.rendered_html ol ol { - list-style: upper-alpha; - margin-top: 0; -} -.rendered_html ol ol ol { - list-style: lower-alpha; -} -.rendered_html ol ol ol ol { - list-style: lower-roman; -} -.rendered_html ol ol ol ol ol { - list-style: decimal; -} -.rendered_html * + ul { - margin-top: 1em; -} -.rendered_html * + ol { - margin-top: 1em; -} -.rendered_html hr { - color: black; - background-color: black; -} -.rendered_html pre { - margin: 1em 2em; - padding: 0px; - background-color: #fff; -} -.rendered_html code { - background-color: #eff0f1; -} -.rendered_html p code { - padding: 1px 5px; -} -.rendered_html pre code { - background-color: #fff; -} -.rendered_html pre, -.rendered_html code { - border: 0; - color: #000; - font-size: 100%; -} -.rendered_html blockquote { - margin: 1em 2em; -} -.rendered_html table { - margin-left: auto; - margin-right: auto; - border: none; - border-collapse: collapse; - border-spacing: 0; - color: black; - font-size: 12px; - table-layout: fixed; -} -.rendered_html thead { - border-bottom: 1px solid black; - vertical-align: bottom; -} -.rendered_html tr, -.rendered_html th, -.rendered_html td { - text-align: right; - vertical-align: middle; - padding: 0.5em 0.5em; - line-height: normal; - white-space: normal; - max-width: none; - border: none; -} -.rendered_html th { - font-weight: bold; -} -.rendered_html tbody tr:nth-child(odd) { - background: #f5f5f5; -} -.rendered_html tbody tr:hover { - background: rgba(66, 165, 245, 0.2); -} -.rendered_html * + table { - margin-top: 1em; -} -.rendered_html p { - text-align: left; -} -.rendered_html * + p { - margin-top: 1em; -} -.rendered_html img { - display: block; - margin-left: auto; - margin-right: auto; -} -.rendered_html * + img { - margin-top: 1em; -} -.rendered_html img, -.rendered_html svg { - max-width: 100%; - height: auto; -} -.rendered_html img.unconfined, -.rendered_html svg.unconfined { - max-width: none; -} -.rendered_html .alert { - margin-bottom: initial; -} -.rendered_html * + .alert { - margin-top: 1em; -} -[dir="rtl"] .rendered_html p { - text-align: right; -} -div.text_cell { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; -} -@media (max-width: 540px) { - div.text_cell > div.prompt { - display: none; - } -} -div.text_cell_render { - /*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/ - outline: none; - resize: none; - width: inherit; - border-style: none; - padding: 0.5em 0.5em 0.5em 0.4em; - color: #000; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -a.anchor-link:link { - text-decoration: none; - padding: 0px 20px; - visibility: hidden; -} -h1:hover .anchor-link, -h2:hover .anchor-link, -h3:hover .anchor-link, -h4:hover .anchor-link, -h5:hover .anchor-link, -h6:hover .anchor-link { - visibility: visible; -} -.text_cell.rendered .input_area { - display: none; -} -.text_cell.rendered .rendered_html { - overflow-x: auto; - overflow-y: hidden; -} -.text_cell.rendered .rendered_html tr, -.text_cell.rendered .rendered_html th, -.text_cell.rendered .rendered_html td { - max-width: none; -} -.text_cell.unrendered .text_cell_render { - display: none; -} -.text_cell .dropzone .input_area { - border: 2px dashed #bababa; - margin: -1px; -} -.cm-header-1, -.cm-header-2, -.cm-header-3, -.cm-header-4, -.cm-header-5, -.cm-header-6 { - font-weight: bold; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} -.cm-header-1 { - font-size: 185.7%; -} -.cm-header-2 { - font-size: 157.1%; -} -.cm-header-3 { - font-size: 128.6%; -} -.cm-header-4 { - font-size: 110%; -} -.cm-header-5 { - font-size: 100%; - font-style: italic; -} -.cm-header-6 { - font-size: 100%; - font-style: italic; -} -/*! -* -* IPython notebook webapp -* -*/ -@media (max-width: 767px) { - .notebook_app { - padding-left: 0px; - padding-right: 0px; - } -} -#ipython-main-app { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - height: 100%; -} -div#notebook_panel { - margin: 0px; - padding: 0px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - height: 100%; -} -div#notebook { - font-size: 14px; - line-height: 20px; - overflow-y: hidden; - overflow-x: auto; - width: 100%; - /* This spaces the page away from the edge of the notebook area */ - padding-top: 20px; - margin: 0px; - outline: none; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - min-height: 100%; -} -@media not print { - #notebook-container { - padding: 15px; - background-color: #fff; - min-height: 0; - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - } -} -@media print { - #notebook-container { - width: 100%; - } -} -div.ui-widget-content { - border: 1px solid #ababab; - outline: none; -} -pre.dialog { - background-color: #f7f7f7; - border: 1px solid #ddd; - border-radius: 2px; - padding: 0.4em; - padding-left: 2em; -} -p.dialog { - padding: 0.2em; -} -/* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems - to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do. - */ -pre, -code, -kbd, -samp { - white-space: pre-wrap; -} -#fonttest { - font-family: monospace; -} -p { - margin-bottom: 0; -} -.end_space { - min-height: 100px; - transition: height .2s ease; -} -.notebook_app > #header { - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); -} -@media not print { - .notebook_app { - background-color: #EEE; - } -} -kbd { - border-style: solid; - border-width: 1px; - box-shadow: none; - margin: 2px; - padding-left: 2px; - padding-right: 2px; - padding-top: 1px; - padding-bottom: 1px; -} -.jupyter-keybindings { - padding: 1px; - line-height: 24px; - border-bottom: 1px solid gray; -} -.jupyter-keybindings input { - margin: 0; - padding: 0; - border: none; -} -.jupyter-keybindings i { - padding: 6px; -} -.well code { - background-color: #ffffff; - border-color: #ababab; - border-width: 1px; - border-style: solid; - padding: 2px; - padding-top: 1px; - padding-bottom: 1px; -} -/* CSS for the cell toolbar */ -.celltoolbar { - border: thin solid #CFCFCF; - border-bottom: none; - background: #EEE; - border-radius: 2px 2px 0px 0px; - width: 100%; - height: 29px; - padding-right: 4px; - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; - /* Old browsers */ - -webkit-box-pack: end; - -moz-box-pack: end; - box-pack: end; - /* Modern browsers */ - justify-content: flex-end; - display: -webkit-flex; -} -@media print { - .celltoolbar { - display: none; - } -} -.ctb_hideshow { - display: none; - vertical-align: bottom; -} -/* ctb_show is added to the ctb_hideshow div to show the cell toolbar. - Cell toolbars are only shown when the ctb_global_show class is also set. -*/ -.ctb_global_show .ctb_show.ctb_hideshow { - display: block; -} -.ctb_global_show .ctb_show + .input_area, -.ctb_global_show .ctb_show + div.text_cell_input, -.ctb_global_show .ctb_show ~ div.text_cell_render { - border-top-right-radius: 0px; - border-top-left-radius: 0px; -} -.ctb_global_show .ctb_show ~ div.text_cell_render { - border: 1px solid #cfcfcf; -} -.celltoolbar { - font-size: 87%; - padding-top: 3px; -} -.celltoolbar select { - display: block; - width: 100%; - height: 32px; - padding: 6px 12px; - font-size: 13px; - line-height: 1.42857143; - color: #555555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; - width: inherit; - font-size: inherit; - height: 22px; - padding: 0px; - display: inline-block; -} -.celltoolbar select:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); -} -.celltoolbar select::-moz-placeholder { - color: #999; - opacity: 1; -} -.celltoolbar select:-ms-input-placeholder { - color: #999; -} -.celltoolbar select::-webkit-input-placeholder { - color: #999; -} -.celltoolbar select::-ms-expand { - border: 0; - background-color: transparent; -} -.celltoolbar select[disabled], -.celltoolbar select[readonly], -fieldset[disabled] .celltoolbar select { - background-color: #eeeeee; - opacity: 1; -} -.celltoolbar select[disabled], -fieldset[disabled] .celltoolbar select { - cursor: not-allowed; -} -textarea.celltoolbar select { - height: auto; -} -select.celltoolbar select { - height: 30px; - line-height: 30px; -} -textarea.celltoolbar select, -select[multiple].celltoolbar select { - height: auto; -} -.celltoolbar label { - margin-left: 5px; - margin-right: 5px; -} -.tags_button_container { - width: 100%; - display: flex; -} -.tag-container { - display: flex; - flex-direction: row; - flex-grow: 1; - overflow: hidden; - position: relative; -} -.tag-container > * { - margin: 0 4px; -} -.remove-tag-btn { - margin-left: 4px; -} -.tags-input { - display: flex; -} -.cell-tag:last-child:after { - content: ""; - position: absolute; - right: 0; - width: 40px; - height: 100%; - /* Fade to background color of cell toolbar */ - background: linear-gradient(to right, rgba(0, 0, 0, 0), #EEE); -} -.tags-input > * { - margin-left: 4px; -} -.cell-tag, -.tags-input input, -.tags-input button { - display: block; - width: 100%; - height: 32px; - padding: 6px 12px; - font-size: 13px; - line-height: 1.42857143; - color: #555555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 1px; - box-shadow: none; - width: inherit; - font-size: inherit; - height: 22px; - line-height: 22px; - padding: 0px 4px; - display: inline-block; -} -.cell-tag:focus, -.tags-input input:focus, -.tags-input button:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6); -} -.cell-tag::-moz-placeholder, -.tags-input input::-moz-placeholder, -.tags-input button::-moz-placeholder { - color: #999; - opacity: 1; -} -.cell-tag:-ms-input-placeholder, -.tags-input input:-ms-input-placeholder, -.tags-input button:-ms-input-placeholder { - color: #999; -} -.cell-tag::-webkit-input-placeholder, -.tags-input input::-webkit-input-placeholder, -.tags-input button::-webkit-input-placeholder { - color: #999; -} -.cell-tag::-ms-expand, -.tags-input input::-ms-expand, -.tags-input button::-ms-expand { - border: 0; - background-color: transparent; -} -.cell-tag[disabled], -.tags-input input[disabled], -.tags-input button[disabled], -.cell-tag[readonly], -.tags-input input[readonly], -.tags-input button[readonly], -fieldset[disabled] .cell-tag, -fieldset[disabled] .tags-input input, -fieldset[disabled] .tags-input button { - background-color: #eeeeee; - opacity: 1; -} -.cell-tag[disabled], -.tags-input input[disabled], -.tags-input button[disabled], -fieldset[disabled] .cell-tag, -fieldset[disabled] .tags-input input, -fieldset[disabled] .tags-input button { - cursor: not-allowed; -} -textarea.cell-tag, -textarea.tags-input input, -textarea.tags-input button { - height: auto; -} -select.cell-tag, -select.tags-input input, -select.tags-input button { - height: 30px; - line-height: 30px; -} -textarea.cell-tag, -textarea.tags-input input, -textarea.tags-input button, -select[multiple].cell-tag, -select[multiple].tags-input input, -select[multiple].tags-input button { - height: auto; -} -.cell-tag, -.tags-input button { - padding: 0px 4px; -} -.cell-tag { - background-color: #fff; - white-space: nowrap; -} -.tags-input input[type=text]:focus { - outline: none; - box-shadow: none; - border-color: #ccc; -} -.completions { - position: absolute; - z-index: 110; - overflow: hidden; - border: 1px solid #ababab; - border-radius: 2px; - -webkit-box-shadow: 0px 6px 10px -1px #adadad; - box-shadow: 0px 6px 10px -1px #adadad; - line-height: 1; -} -.completions select { - background: white; - outline: none; - border: none; - padding: 0px; - margin: 0px; - overflow: auto; - font-family: monospace; - font-size: 110%; - color: #000; - width: auto; -} -.completions select option.context { - color: #286090; -} -#kernel_logo_widget .current_kernel_logo { - display: none; - margin-top: -1px; - margin-bottom: -1px; - width: 32px; - height: 32px; -} -[dir="rtl"] #kernel_logo_widget { - float: left !important; - float: left; -} -.modal .modal-body .move-path { - display: flex; - flex-direction: row; - justify-content: space; - align-items: center; -} -.modal .modal-body .move-path .server-root { - padding-right: 20px; -} -.modal .modal-body .move-path .path-input { - flex: 1; -} -#menubar { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - margin-top: 1px; -} -#menubar .navbar { - border-top: 1px; - border-radius: 0px 0px 2px 2px; - margin-bottom: 0px; -} -#menubar .navbar-toggle { - float: left; - padding-top: 7px; - padding-bottom: 7px; - border: none; -} -#menubar .navbar-collapse { - clear: left; -} -[dir="rtl"] #menubar .navbar-toggle { - float: right; -} -[dir="rtl"] #menubar .navbar-collapse { - clear: right; -} -[dir="rtl"] #menubar .navbar-nav { - float: right; -} -[dir="rtl"] #menubar .nav { - padding-right: 0px; -} -[dir="rtl"] #menubar .navbar-nav > li { - float: right; -} -[dir="rtl"] #menubar .navbar-right { - float: left !important; -} -[dir="rtl"] ul.dropdown-menu { - text-align: right; - left: auto; -} -[dir="rtl"] ul#new-menu.dropdown-menu { - right: auto; - left: 0; -} -.nav-wrapper { - border-bottom: 1px solid #e7e7e7; -} -i.menu-icon { - padding-top: 4px; -} -[dir="rtl"] i.menu-icon.pull-right { - float: left !important; - float: left; -} -ul#help_menu li a { - overflow: hidden; - padding-right: 2.2em; -} -ul#help_menu li a i { - margin-right: -1.2em; -} -[dir="rtl"] ul#help_menu li a { - padding-left: 2.2em; -} -[dir="rtl"] ul#help_menu li a i { - margin-right: 0; - margin-left: -1.2em; -} -[dir="rtl"] ul#help_menu li a i.pull-right { - float: left !important; - float: left; -} -.dropdown-submenu { - position: relative; -} -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; -} -[dir="rtl"] .dropdown-submenu > .dropdown-menu { - right: 100%; - margin-right: -1px; -} -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} -.dropdown-submenu > a:after { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - display: block; - content: "\f0da"; - float: right; - color: #333333; - margin-top: 2px; - margin-right: -10px; -} -.dropdown-submenu > a:after.fa-pull-left { - margin-right: .3em; -} -.dropdown-submenu > a:after.fa-pull-right { - margin-left: .3em; -} -.dropdown-submenu > a:after.pull-left { - margin-right: .3em; -} -.dropdown-submenu > a:after.pull-right { - margin-left: .3em; -} -[dir="rtl"] .dropdown-submenu > a:after { - float: left; - content: "\f0d9"; - margin-right: 0; - margin-left: -10px; -} -.dropdown-submenu:hover > a:after { - color: #262626; -} -.dropdown-submenu.pull-left { - float: none; -} -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; -} -#notification_area { - float: right !important; - float: right; - z-index: 10; -} -[dir="rtl"] #notification_area { - float: left !important; - float: left; -} -.indicator_area { - float: right !important; - float: right; - color: #777; - margin-left: 5px; - margin-right: 5px; - width: 11px; - z-index: 10; - text-align: center; - width: auto; -} -[dir="rtl"] .indicator_area { - float: left !important; - float: left; -} -#kernel_indicator { - float: right !important; - float: right; - color: #777; - margin-left: 5px; - margin-right: 5px; - width: 11px; - z-index: 10; - text-align: center; - width: auto; - border-left: 1px solid; -} -#kernel_indicator .kernel_indicator_name { - padding-left: 5px; - padding-right: 5px; -} -[dir="rtl"] #kernel_indicator { - float: left !important; - float: left; - border-left: 0; - border-right: 1px solid; -} -#modal_indicator { - float: right !important; - float: right; - color: #777; - margin-left: 5px; - margin-right: 5px; - width: 11px; - z-index: 10; - text-align: center; - width: auto; -} -[dir="rtl"] #modal_indicator { - float: left !important; - float: left; -} -#readonly-indicator { - float: right !important; - float: right; - color: #777; - margin-left: 5px; - margin-right: 5px; - width: 11px; - z-index: 10; - text-align: center; - width: auto; - margin-top: 2px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - display: none; -} -.modal_indicator:before { - width: 1.28571429em; - text-align: center; -} -.edit_mode .modal_indicator:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f040"; -} -.edit_mode .modal_indicator:before.fa-pull-left { - margin-right: .3em; -} -.edit_mode .modal_indicator:before.fa-pull-right { - margin-left: .3em; -} -.edit_mode .modal_indicator:before.pull-left { - margin-right: .3em; -} -.edit_mode .modal_indicator:before.pull-right { - margin-left: .3em; -} -.command_mode .modal_indicator:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: ' '; -} -.command_mode .modal_indicator:before.fa-pull-left { - margin-right: .3em; -} -.command_mode .modal_indicator:before.fa-pull-right { - margin-left: .3em; -} -.command_mode .modal_indicator:before.pull-left { - margin-right: .3em; -} -.command_mode .modal_indicator:before.pull-right { - margin-left: .3em; -} -.kernel_idle_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f10c"; -} -.kernel_idle_icon:before.fa-pull-left { - margin-right: .3em; -} -.kernel_idle_icon:before.fa-pull-right { - margin-left: .3em; -} -.kernel_idle_icon:before.pull-left { - margin-right: .3em; -} -.kernel_idle_icon:before.pull-right { - margin-left: .3em; -} -.kernel_busy_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f111"; -} -.kernel_busy_icon:before.fa-pull-left { - margin-right: .3em; -} -.kernel_busy_icon:before.fa-pull-right { - margin-left: .3em; -} -.kernel_busy_icon:before.pull-left { - margin-right: .3em; -} -.kernel_busy_icon:before.pull-right { - margin-left: .3em; -} -.kernel_dead_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f1e2"; -} -.kernel_dead_icon:before.fa-pull-left { - margin-right: .3em; -} -.kernel_dead_icon:before.fa-pull-right { - margin-left: .3em; -} -.kernel_dead_icon:before.pull-left { - margin-right: .3em; -} -.kernel_dead_icon:before.pull-right { - margin-left: .3em; -} -.kernel_disconnected_icon:before { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f127"; -} -.kernel_disconnected_icon:before.fa-pull-left { - margin-right: .3em; -} -.kernel_disconnected_icon:before.fa-pull-right { - margin-left: .3em; -} -.kernel_disconnected_icon:before.pull-left { - margin-right: .3em; -} -.kernel_disconnected_icon:before.pull-right { - margin-left: .3em; -} -.notification_widget { - color: #777; - z-index: 10; - background: rgba(240, 240, 240, 0.5); - margin-right: 4px; - color: #333; - background-color: #fff; - border-color: #ccc; -} -.notification_widget:focus, -.notification_widget.focus { - color: #333; - background-color: #e6e6e6; - border-color: #8c8c8c; -} -.notification_widget:hover { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.notification_widget:active, -.notification_widget.active, -.open > .dropdown-toggle.notification_widget { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.notification_widget:active:hover, -.notification_widget.active:hover, -.open > .dropdown-toggle.notification_widget:hover, -.notification_widget:active:focus, -.notification_widget.active:focus, -.open > .dropdown-toggle.notification_widget:focus, -.notification_widget:active.focus, -.notification_widget.active.focus, -.open > .dropdown-toggle.notification_widget.focus { - color: #333; - background-color: #d4d4d4; - border-color: #8c8c8c; -} -.notification_widget:active, -.notification_widget.active, -.open > .dropdown-toggle.notification_widget { - background-image: none; -} -.notification_widget.disabled:hover, -.notification_widget[disabled]:hover, -fieldset[disabled] .notification_widget:hover, -.notification_widget.disabled:focus, -.notification_widget[disabled]:focus, -fieldset[disabled] .notification_widget:focus, -.notification_widget.disabled.focus, -.notification_widget[disabled].focus, -fieldset[disabled] .notification_widget.focus { - background-color: #fff; - border-color: #ccc; -} -.notification_widget .badge { - color: #fff; - background-color: #333; -} -.notification_widget.warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.notification_widget.warning:focus, -.notification_widget.warning.focus { - color: #fff; - background-color: #ec971f; - border-color: #985f0d; -} -.notification_widget.warning:hover { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.notification_widget.warning:active, -.notification_widget.warning.active, -.open > .dropdown-toggle.notification_widget.warning { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.notification_widget.warning:active:hover, -.notification_widget.warning.active:hover, -.open > .dropdown-toggle.notification_widget.warning:hover, -.notification_widget.warning:active:focus, -.notification_widget.warning.active:focus, -.open > .dropdown-toggle.notification_widget.warning:focus, -.notification_widget.warning:active.focus, -.notification_widget.warning.active.focus, -.open > .dropdown-toggle.notification_widget.warning.focus { - color: #fff; - background-color: #d58512; - border-color: #985f0d; -} -.notification_widget.warning:active, -.notification_widget.warning.active, -.open > .dropdown-toggle.notification_widget.warning { - background-image: none; -} -.notification_widget.warning.disabled:hover, -.notification_widget.warning[disabled]:hover, -fieldset[disabled] .notification_widget.warning:hover, -.notification_widget.warning.disabled:focus, -.notification_widget.warning[disabled]:focus, -fieldset[disabled] .notification_widget.warning:focus, -.notification_widget.warning.disabled.focus, -.notification_widget.warning[disabled].focus, -fieldset[disabled] .notification_widget.warning.focus { - background-color: #f0ad4e; - border-color: #eea236; -} -.notification_widget.warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.notification_widget.success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.notification_widget.success:focus, -.notification_widget.success.focus { - color: #fff; - background-color: #449d44; - border-color: #255625; -} -.notification_widget.success:hover { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.notification_widget.success:active, -.notification_widget.success.active, -.open > .dropdown-toggle.notification_widget.success { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.notification_widget.success:active:hover, -.notification_widget.success.active:hover, -.open > .dropdown-toggle.notification_widget.success:hover, -.notification_widget.success:active:focus, -.notification_widget.success.active:focus, -.open > .dropdown-toggle.notification_widget.success:focus, -.notification_widget.success:active.focus, -.notification_widget.success.active.focus, -.open > .dropdown-toggle.notification_widget.success.focus { - color: #fff; - background-color: #398439; - border-color: #255625; -} -.notification_widget.success:active, -.notification_widget.success.active, -.open > .dropdown-toggle.notification_widget.success { - background-image: none; -} -.notification_widget.success.disabled:hover, -.notification_widget.success[disabled]:hover, -fieldset[disabled] .notification_widget.success:hover, -.notification_widget.success.disabled:focus, -.notification_widget.success[disabled]:focus, -fieldset[disabled] .notification_widget.success:focus, -.notification_widget.success.disabled.focus, -.notification_widget.success[disabled].focus, -fieldset[disabled] .notification_widget.success.focus { - background-color: #5cb85c; - border-color: #4cae4c; -} -.notification_widget.success .badge { - color: #5cb85c; - background-color: #fff; -} -.notification_widget.info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.notification_widget.info:focus, -.notification_widget.info.focus { - color: #fff; - background-color: #31b0d5; - border-color: #1b6d85; -} -.notification_widget.info:hover { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.notification_widget.info:active, -.notification_widget.info.active, -.open > .dropdown-toggle.notification_widget.info { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.notification_widget.info:active:hover, -.notification_widget.info.active:hover, -.open > .dropdown-toggle.notification_widget.info:hover, -.notification_widget.info:active:focus, -.notification_widget.info.active:focus, -.open > .dropdown-toggle.notification_widget.info:focus, -.notification_widget.info:active.focus, -.notification_widget.info.active.focus, -.open > .dropdown-toggle.notification_widget.info.focus { - color: #fff; - background-color: #269abc; - border-color: #1b6d85; -} -.notification_widget.info:active, -.notification_widget.info.active, -.open > .dropdown-toggle.notification_widget.info { - background-image: none; -} -.notification_widget.info.disabled:hover, -.notification_widget.info[disabled]:hover, -fieldset[disabled] .notification_widget.info:hover, -.notification_widget.info.disabled:focus, -.notification_widget.info[disabled]:focus, -fieldset[disabled] .notification_widget.info:focus, -.notification_widget.info.disabled.focus, -.notification_widget.info[disabled].focus, -fieldset[disabled] .notification_widget.info.focus { - background-color: #5bc0de; - border-color: #46b8da; -} -.notification_widget.info .badge { - color: #5bc0de; - background-color: #fff; -} -.notification_widget.danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.notification_widget.danger:focus, -.notification_widget.danger.focus { - color: #fff; - background-color: #c9302c; - border-color: #761c19; -} -.notification_widget.danger:hover { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.notification_widget.danger:active, -.notification_widget.danger.active, -.open > .dropdown-toggle.notification_widget.danger { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.notification_widget.danger:active:hover, -.notification_widget.danger.active:hover, -.open > .dropdown-toggle.notification_widget.danger:hover, -.notification_widget.danger:active:focus, -.notification_widget.danger.active:focus, -.open > .dropdown-toggle.notification_widget.danger:focus, -.notification_widget.danger:active.focus, -.notification_widget.danger.active.focus, -.open > .dropdown-toggle.notification_widget.danger.focus { - color: #fff; - background-color: #ac2925; - border-color: #761c19; -} -.notification_widget.danger:active, -.notification_widget.danger.active, -.open > .dropdown-toggle.notification_widget.danger { - background-image: none; -} -.notification_widget.danger.disabled:hover, -.notification_widget.danger[disabled]:hover, -fieldset[disabled] .notification_widget.danger:hover, -.notification_widget.danger.disabled:focus, -.notification_widget.danger[disabled]:focus, -fieldset[disabled] .notification_widget.danger:focus, -.notification_widget.danger.disabled.focus, -.notification_widget.danger[disabled].focus, -fieldset[disabled] .notification_widget.danger.focus { - background-color: #d9534f; - border-color: #d43f3a; -} -.notification_widget.danger .badge { - color: #d9534f; - background-color: #fff; -} -div#pager { - background-color: #fff; - font-size: 14px; - line-height: 20px; - overflow: hidden; - display: none; - position: fixed; - bottom: 0px; - width: 100%; - max-height: 50%; - padding-top: 8px; - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - /* Display over codemirror */ - z-index: 100; - /* Hack which prevents jquery ui resizable from changing top. */ - top: auto !important; -} -div#pager pre { - line-height: 1.21429em; - color: #000; - background-color: #f7f7f7; - padding: 0.4em; -} -div#pager #pager-button-area { - position: absolute; - top: 8px; - right: 20px; -} -div#pager #pager-contents { - position: relative; - overflow: auto; - width: 100%; - height: 100%; -} -div#pager #pager-contents #pager-container { - position: relative; - padding: 15px 0px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -div#pager .ui-resizable-handle { - top: 0px; - height: 8px; - background: #f7f7f7; - border-top: 1px solid #cfcfcf; - border-bottom: 1px solid #cfcfcf; - /* This injects handle bars (a short, wide = symbol) for - the resize handle. */ -} -div#pager .ui-resizable-handle::after { - content: ''; - top: 2px; - left: 50%; - height: 3px; - width: 30px; - margin-left: -15px; - position: absolute; - border-top: 1px solid #cfcfcf; -} -.quickhelp { - /* Old browsers */ - display: -webkit-box; - -webkit-box-orient: horizontal; - -webkit-box-align: stretch; - display: -moz-box; - -moz-box-orient: horizontal; - -moz-box-align: stretch; - display: box; - box-orient: horizontal; - box-align: stretch; - /* Modern browsers */ - display: flex; - flex-direction: row; - align-items: stretch; - line-height: 1.8em; -} -.shortcut_key { - display: inline-block; - width: 21ex; - text-align: right; - font-family: monospace; -} -.shortcut_descr { - display: inline-block; - /* Old browsers */ - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - /* Modern browsers */ - flex: 1; -} -span.save_widget { - height: 30px; - margin-top: 4px; - display: flex; - justify-content: flex-start; - align-items: baseline; - width: 50%; - flex: 1; -} -span.save_widget span.filename { - height: 100%; - line-height: 1em; - margin-left: 16px; - border: none; - font-size: 146.5%; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - border-radius: 2px; -} -span.save_widget span.filename:hover { - background-color: #e6e6e6; -} -[dir="rtl"] span.save_widget.pull-left { - float: right !important; - float: right; -} -[dir="rtl"] span.save_widget span.filename { - margin-left: 0; - margin-right: 16px; -} -span.checkpoint_status, -span.autosave_status { - font-size: small; - white-space: nowrap; - padding: 0 5px; -} -@media (max-width: 767px) { - span.save_widget { - font-size: small; - padding: 0 0 0 5px; - } - span.checkpoint_status, - span.autosave_status { - display: none; - } -} -@media (min-width: 768px) and (max-width: 991px) { - span.checkpoint_status { - display: none; - } - span.autosave_status { - font-size: x-small; - } -} -.toolbar { - padding: 0px; - margin-left: -5px; - margin-top: 2px; - margin-bottom: 5px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -.toolbar select, -.toolbar label { - width: auto; - vertical-align: middle; - margin-right: 2px; - margin-bottom: 0px; - display: inline; - font-size: 92%; - margin-left: 0.3em; - margin-right: 0.3em; - padding: 0px; - padding-top: 3px; -} -.toolbar .btn { - padding: 2px 8px; -} -.toolbar .btn-group { - margin-top: 0px; - margin-left: 5px; -} -.toolbar-btn-label { - margin-left: 6px; -} -#maintoolbar { - margin-bottom: -3px; - margin-top: -8px; - border: 0px; - min-height: 27px; - margin-left: 0px; - padding-top: 11px; - padding-bottom: 3px; -} -#maintoolbar .navbar-text { - float: none; - vertical-align: middle; - text-align: right; - margin-left: 5px; - margin-right: 0px; - margin-top: 0px; -} -.select-xs { - height: 24px; -} -[dir="rtl"] .btn-group > .btn, -.btn-group-vertical > .btn { - float: right; -} -.pulse, -.dropdown-menu > li > a.pulse, -li.pulse > a.dropdown-toggle, -li.pulse.open > a.dropdown-toggle { - background-color: #F37626; - color: white; -} -/** - * Primary styles - * - * Author: Jupyter Development Team - */ -/** WARNING IF YOU ARE EDITTING THIS FILE, if this is a .css file, It has a lot - * of chance of beeing generated from the ../less/[samename].less file, you can - * try to get back the less file by reverting somme commit in history - **/ -/* - * We'll try to get something pretty, so we - * have some strange css to have the scroll bar on - * the left with fix button on the top right of the tooltip - */ -@-moz-keyframes fadeOut { - from { - opacity: 1; - } - to { - opacity: 0; - } -} -@-webkit-keyframes fadeOut { - from { - opacity: 1; - } - to { - opacity: 0; - } -} -@-moz-keyframes fadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -@-webkit-keyframes fadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -/*properties of tooltip after "expand"*/ -.bigtooltip { - overflow: auto; - height: 200px; - -webkit-transition-property: height; - -webkit-transition-duration: 500ms; - -moz-transition-property: height; - -moz-transition-duration: 500ms; - transition-property: height; - transition-duration: 500ms; -} -/*properties of tooltip before "expand"*/ -.smalltooltip { - -webkit-transition-property: height; - -webkit-transition-duration: 500ms; - -moz-transition-property: height; - -moz-transition-duration: 500ms; - transition-property: height; - transition-duration: 500ms; - text-overflow: ellipsis; - overflow: hidden; - height: 80px; -} -.tooltipbuttons { - position: absolute; - padding-right: 15px; - top: 0px; - right: 0px; -} -.tooltiptext { - /*avoid the button to overlap on some docstring*/ - padding-right: 30px; -} -.ipython_tooltip { - max-width: 700px; - /*fade-in animation when inserted*/ - -webkit-animation: fadeOut 400ms; - -moz-animation: fadeOut 400ms; - animation: fadeOut 400ms; - -webkit-animation: fadeIn 400ms; - -moz-animation: fadeIn 400ms; - animation: fadeIn 400ms; - vertical-align: middle; - background-color: #f7f7f7; - overflow: visible; - border: #ababab 1px solid; - outline: none; - padding: 3px; - margin: 0px; - padding-left: 7px; - font-family: monospace; - min-height: 50px; - -moz-box-shadow: 0px 6px 10px -1px #adadad; - -webkit-box-shadow: 0px 6px 10px -1px #adadad; - box-shadow: 0px 6px 10px -1px #adadad; - border-radius: 2px; - position: absolute; - z-index: 1000; -} -.ipython_tooltip a { - float: right; -} -.ipython_tooltip .tooltiptext pre { - border: 0; - border-radius: 0; - font-size: 100%; - background-color: #f7f7f7; -} -.pretooltiparrow { - left: 0px; - margin: 0px; - top: -16px; - width: 40px; - height: 16px; - overflow: hidden; - position: absolute; -} -.pretooltiparrow:before { - background-color: #f7f7f7; - border: 1px #ababab solid; - z-index: 11; - content: ""; - position: absolute; - left: 15px; - top: 10px; - width: 25px; - height: 25px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); -} -ul.typeahead-list i { - margin-left: -10px; - width: 18px; -} -[dir="rtl"] ul.typeahead-list i { - margin-left: 0; - margin-right: -10px; -} -ul.typeahead-list { - max-height: 80vh; - overflow: auto; -} -ul.typeahead-list > li > a { - /** Firefox bug **/ - /* see https://github.com/jupyter/notebook/issues/559 */ - white-space: normal; -} -ul.typeahead-list > li > a.pull-right { - float: left !important; - float: left; -} -[dir="rtl"] .typeahead-list { - text-align: right; -} -.cmd-palette .modal-body { - padding: 7px; -} -.cmd-palette form { - background: white; -} -.cmd-palette input { - outline: none; -} -.no-shortcut { - min-width: 20px; - color: transparent; -} -[dir="rtl"] .no-shortcut.pull-right { - float: left !important; - float: left; -} -[dir="rtl"] .command-shortcut.pull-right { - float: left !important; - float: left; -} -.command-shortcut:before { - content: "(command mode)"; - padding-right: 3px; - color: #777777; -} -.edit-shortcut:before { - content: "(edit)"; - padding-right: 3px; - color: #777777; -} -[dir="rtl"] .edit-shortcut.pull-right { - float: left !important; - float: left; -} -#find-and-replace #replace-preview .match, -#find-and-replace #replace-preview .insert { - background-color: #BBDEFB; - border-color: #90CAF9; - border-style: solid; - border-width: 1px; - border-radius: 0px; -} -[dir="ltr"] #find-and-replace .input-group-btn + .form-control { - border-left: none; -} -[dir="rtl"] #find-and-replace .input-group-btn + .form-control { - border-right: none; -} -#find-and-replace #replace-preview .replace .match { - background-color: #FFCDD2; - border-color: #EF9A9A; - border-radius: 0px; -} -#find-and-replace #replace-preview .replace .insert { - background-color: #C8E6C9; - border-color: #A5D6A7; - border-radius: 0px; -} -#find-and-replace #replace-preview { - max-height: 60vh; - overflow: auto; -} -#find-and-replace #replace-preview pre { - padding: 5px 10px; -} -.terminal-app { - background: #EEE; -} -.terminal-app #header { - background: #fff; - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2); -} -.terminal-app .terminal { - width: 100%; - float: left; - font-family: monospace; - color: white; - background: black; - padding: 0.4em; - border-radius: 2px; - -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.4); - box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.4); -} -.terminal-app .terminal, -.terminal-app .terminal dummy-screen { - line-height: 1em; - font-size: 14px; -} -.terminal-app .terminal .xterm-rows { - padding: 10px; -} -.terminal-app .terminal-cursor { - color: black; - background: white; -} -.terminal-app #terminado-container { - margin-top: 20px; -} -/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/lab/base.html.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/lab/base.html.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/lab/base.html.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/lab/base.html.j2 2022-08-11 11:50:51.000000000 +0000 @@ -26,7 +26,7 @@ {% block input %} {%- endblock input %} @@ -98,13 +98,24 @@ {{ self.empty_in_prompt() }} {%- endif -%}
{%- endblock markdowncell %} +{% block rawcell scoped %} +{%- if cell.metadata.get('raw_mimetype', '').lower() in resources.get('raw_mimetypes', ['']) -%} +{{ cell.source | clean_html }} +{%- endif -%} +{%- endblock rawcell %} + {% block unknowncell scoped %} unknown type {{ cell.type }} {% endblock unknowncell %} @@ -146,39 +157,48 @@ {% block data_svg scoped -%} {%- endblock data_svg %} {% block data_html scoped -%} {%- endblock data_html %} {% block data_markdown scoped -%} +{%- if resources.should_sanitize_html %} +{%- set html_value=output.data['text/markdown'] | markdown2html | clean_html -%} +{%- else %} +{%- set html_value=output.data['text/markdown'] | markdown2html -%} +{%- endif %} {%- endblock data_markdown %} {% block data_png scoped %} {%- endblock -%} -{%- block data_widget_state scoped %} -{% set div_id = uuid4() %} -{% set datatype_list = output.data | filter_data_type %} -{% set datatype = datatype_list[0]%} -
- - -
-{%- endblock data_widget_state -%} - {%- block data_widget_view scoped %} {% set div_id = uuid4() %} {% set datatype_list = output.data | filter_data_type %} @@ -290,7 +298,7 @@ var element = document.getElementById('{{ div_id }}'); {%- endblock data_widget_view -%} @@ -299,7 +307,7 @@ {% set mimetype = 'application/vnd.jupyter.widget-state+json'%} {% if mimetype in nb.metadata.get("widgets",{})%} {% endif %} {{ super() }} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/lab/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/lab/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/lab/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/lab/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,12 +1,12 @@ { - "base_template": "base", - "mimetypes": { - "text/html": true - }, - "preprocessors": { - "100-pygments": { - "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor", - "enabled": true - } + "base_template": "base", + "mimetypes": { + "text/html": true + }, + "preprocessors": { + "100-pygments": { + "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor", + "enabled": true } + } } diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/lab/index.html.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/lab/index.html.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/lab/index.html.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/lab/index.html.j2 2022-08-11 11:50:51.000000000 +0000 @@ -9,7 +9,7 @@ {%- block html_head -%} -{% set nb_title = nb.metadata.get('title', '') or resources['metadata']['name'] %} +{% set nb_title = nb.metadata.get('title', resources['metadata']['name']) | escape_html_keep_quotes %} {{nb_title}} {%- block html_head_js -%} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/base.tex.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/base.tex.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/base.tex.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/base.tex.j2 2022-08-11 11:50:51.000000000 +0000 @@ -57,7 +57,7 @@ \fi \usepackage{fancyvrb} % verbatim replacement that allows latex - \usepackage{grffile} % extends the file name processing of package graphics + \usepackage{grffile} % extends the file name processing of package graphics % to support a larger range \makeatletter % fix for old versions of grffile with XeLaTeX \@ifpackagelater{grffile}{2019/11/01} @@ -142,7 +142,7 @@ \newcommand{\RegionMarkerTok}[1]{{#1}} \newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}} \newcommand{\NormalTok}[1]{{#1}} - + % Additional commands for more recent versions of Pandoc \newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{{#1}}} \newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}} @@ -161,8 +161,8 @@ \newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{{#1}}} \newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}} \newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}} - - + + % Define a nice break command that doesn't care if a line doesn't already % exist. \def\br{\hspace*{\fill} \\* } @@ -189,7 +189,7 @@ ((* block commands *)) % Prevent overflowing lines due to hard-to-break entities - \sloppy + \sloppy % Setup hyperref package \hypersetup{ breaklinks=true, % so long urls are correctly broken across lines diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,8 +1,8 @@ { - "base_template": "base", - "mimetypes": { - "text/latex": true, - "text/tex": true, - "application/pdf": true - } + "base_template": "base", + "mimetypes": { + "text/latex": true, + "text/tex": true, + "application/pdf": true + } } diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/null.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/null.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/null.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/null.j2 2022-08-11 11:50:51.000000000 +0000 @@ -30,7 +30,7 @@ ((*- block body -*)) ((*- for cell in nb.cells -*)) ((*- block any_cell scoped -*)) - ((*- if cell.cell_type == 'code'-*)) + ((*- if cell.cell_type == 'code'-*)) ((*- if resources.global_content_filter.include_code -*)) ((*- block codecell scoped -*)) ((*- if resources.global_content_filter.include_input and not cell.get("transient",{}).get("remove_source", false) -*)) diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/style_ipython.tex.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/style_ipython.tex.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/style_ipython.tex.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/style_ipython.tex.j2 2022-08-11 11:50:51.000000000 +0000 @@ -65,6 +65,6 @@ ((*- endif -*)) ((*- set indention = " " * (execution_count | length + 7) -*)) \begin{Verbatim}[commandchars=\\\{\}] -((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) ))) +((( text | add_prompts(first='{\\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) ))) \end{Verbatim} ((*- endmacro *)) diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/style_jupyter.tex.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/style_jupyter.tex.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/latex/style_jupyter.tex.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/latex/style_jupyter.tex.j2 2022-08-11 11:50:51.000000000 +0000 @@ -12,53 +12,53 @@ % Pygments definitions (((- resources.latex.pygments_definitions ))) - % For linebreaks inside Verbatim environment from package fancyvrb. + % For linebreaks inside Verbatim environment from package fancyvrb. \makeatletter - \newbox\Wrappedcontinuationbox - \newbox\Wrappedvisiblespacebox - \newcommand*\Wrappedvisiblespace {\textcolor{red}{\textvisiblespace}} - \newcommand*\Wrappedcontinuationsymbol {\textcolor{red}{\llap{\tiny$\m@th\hookrightarrow$}}} - \newcommand*\Wrappedcontinuationindent {3ex } - \newcommand*\Wrappedafterbreak {\kern\Wrappedcontinuationindent\copy\Wrappedcontinuationbox} - % Take advantage of the already applied Pygments mark-up to insert - % potential linebreaks for TeX processing. - % {, <, #, %, $, ' and ": go to next line. - % _, }, ^, &, >, - and ~: stay at end of broken line. - % Use of \textquotesingle for straight quote. - \newcommand*\Wrappedbreaksatspecials {% - \def\PYGZus{\discretionary{\char`\_}{\Wrappedafterbreak}{\char`\_}}% - \def\PYGZob{\discretionary{}{\Wrappedafterbreak\char`\{}{\char`\{}}% - \def\PYGZcb{\discretionary{\char`\}}{\Wrappedafterbreak}{\char`\}}}% - \def\PYGZca{\discretionary{\char`\^}{\Wrappedafterbreak}{\char`\^}}% - \def\PYGZam{\discretionary{\char`\&}{\Wrappedafterbreak}{\char`\&}}% - \def\PYGZlt{\discretionary{}{\Wrappedafterbreak\char`\<}{\char`\<}}% - \def\PYGZgt{\discretionary{\char`\>}{\Wrappedafterbreak}{\char`\>}}% - \def\PYGZsh{\discretionary{}{\Wrappedafterbreak\char`\#}{\char`\#}}% - \def\PYGZpc{\discretionary{}{\Wrappedafterbreak\char`\%}{\char`\%}}% - \def\PYGZdl{\discretionary{}{\Wrappedafterbreak\char`\$}{\char`\$}}% - \def\PYGZhy{\discretionary{\char`\-}{\Wrappedafterbreak}{\char`\-}}% - \def\PYGZsq{\discretionary{}{\Wrappedafterbreak\textquotesingle}{\textquotesingle}}% - \def\PYGZdq{\discretionary{}{\Wrappedafterbreak\char`\"}{\char`\"}}% - \def\PYGZti{\discretionary{\char`\~}{\Wrappedafterbreak}{\char`\~}}% - } - % Some characters . , ; ? ! / are not pygmentized. - % This macro makes them "active" and they will insert potential linebreaks - \newcommand*\Wrappedbreaksatpunct {% - \lccode`\~`\.\lowercase{\def~}{\discretionary{\hbox{\char`\.}}{\Wrappedafterbreak}{\hbox{\char`\.}}}% - \lccode`\~`\,\lowercase{\def~}{\discretionary{\hbox{\char`\,}}{\Wrappedafterbreak}{\hbox{\char`\,}}}% - \lccode`\~`\;\lowercase{\def~}{\discretionary{\hbox{\char`\;}}{\Wrappedafterbreak}{\hbox{\char`\;}}}% - \lccode`\~`\:\lowercase{\def~}{\discretionary{\hbox{\char`\:}}{\Wrappedafterbreak}{\hbox{\char`\:}}}% - \lccode`\~`\?\lowercase{\def~}{\discretionary{\hbox{\char`\?}}{\Wrappedafterbreak}{\hbox{\char`\?}}}% - \lccode`\~`\!\lowercase{\def~}{\discretionary{\hbox{\char`\!}}{\Wrappedafterbreak}{\hbox{\char`\!}}}% - \lccode`\~`\/\lowercase{\def~}{\discretionary{\hbox{\char`\/}}{\Wrappedafterbreak}{\hbox{\char`\/}}}% + \newbox\Wrappedcontinuationbox + \newbox\Wrappedvisiblespacebox + \newcommand*\Wrappedvisiblespace {\textcolor{red}{\textvisiblespace}} + \newcommand*\Wrappedcontinuationsymbol {\textcolor{red}{\llap{\tiny$\m@th\hookrightarrow$}}} + \newcommand*\Wrappedcontinuationindent {3ex } + \newcommand*\Wrappedafterbreak {\kern\Wrappedcontinuationindent\copy\Wrappedcontinuationbox} + % Take advantage of the already applied Pygments mark-up to insert + % potential linebreaks for TeX processing. + % {, <, #, %, $, ' and ": go to next line. + % _, }, ^, &, >, - and ~: stay at end of broken line. + % Use of \textquotesingle for straight quote. + \newcommand*\Wrappedbreaksatspecials {% + \def\PYGZus{\discretionary{\char`\_}{\Wrappedafterbreak}{\char`\_}}% + \def\PYGZob{\discretionary{}{\Wrappedafterbreak\char`\{}{\char`\{}}% + \def\PYGZcb{\discretionary{\char`\}}{\Wrappedafterbreak}{\char`\}}}% + \def\PYGZca{\discretionary{\char`\^}{\Wrappedafterbreak}{\char`\^}}% + \def\PYGZam{\discretionary{\char`\&}{\Wrappedafterbreak}{\char`\&}}% + \def\PYGZlt{\discretionary{}{\Wrappedafterbreak\char`\<}{\char`\<}}% + \def\PYGZgt{\discretionary{\char`\>}{\Wrappedafterbreak}{\char`\>}}% + \def\PYGZsh{\discretionary{}{\Wrappedafterbreak\char`\#}{\char`\#}}% + \def\PYGZpc{\discretionary{}{\Wrappedafterbreak\char`\%}{\char`\%}}% + \def\PYGZdl{\discretionary{}{\Wrappedafterbreak\char`\$}{\char`\$}}% + \def\PYGZhy{\discretionary{\char`\-}{\Wrappedafterbreak}{\char`\-}}% + \def\PYGZsq{\discretionary{}{\Wrappedafterbreak\textquotesingle}{\textquotesingle}}% + \def\PYGZdq{\discretionary{}{\Wrappedafterbreak\char`\"}{\char`\"}}% + \def\PYGZti{\discretionary{\char`\~}{\Wrappedafterbreak}{\char`\~}}% + } + % Some characters . , ; ? ! / are not pygmentized. + % This macro makes them "active" and they will insert potential linebreaks + \newcommand*\Wrappedbreaksatpunct {% + \lccode`\~`\.\lowercase{\def~}{\discretionary{\hbox{\char`\.}}{\Wrappedafterbreak}{\hbox{\char`\.}}}% + \lccode`\~`\,\lowercase{\def~}{\discretionary{\hbox{\char`\,}}{\Wrappedafterbreak}{\hbox{\char`\,}}}% + \lccode`\~`\;\lowercase{\def~}{\discretionary{\hbox{\char`\;}}{\Wrappedafterbreak}{\hbox{\char`\;}}}% + \lccode`\~`\:\lowercase{\def~}{\discretionary{\hbox{\char`\:}}{\Wrappedafterbreak}{\hbox{\char`\:}}}% + \lccode`\~`\?\lowercase{\def~}{\discretionary{\hbox{\char`\?}}{\Wrappedafterbreak}{\hbox{\char`\?}}}% + \lccode`\~`\!\lowercase{\def~}{\discretionary{\hbox{\char`\!}}{\Wrappedafterbreak}{\hbox{\char`\!}}}% + \lccode`\~`\/\lowercase{\def~}{\discretionary{\hbox{\char`\/}}{\Wrappedafterbreak}{\hbox{\char`\/}}}% \catcode`\.\active - \catcode`\,\active + \catcode`\,\active \catcode`\;\active \catcode`\:\active \catcode`\?\active \catcode`\!\active - \catcode`\/\active - \lccode`\~`\~ + \catcode`\/\active + \lccode`\~`\~ } \makeatother @@ -81,10 +81,10 @@ \discretionary{\copy\Wrappedvisiblespacebox}{\Wrappedafterbreak} {\kern\fontdimen2\font}% }% - + % Allow breaks at special characters using \PYG... macros. \Wrappedbreaksatspecials - % Breaks at punctuation characters . , ; ? ! and / need catcode=\active + % Breaks at punctuation characters . , ; ? ! and / need catcode=\active \OriginalVerbatim[#1,codes*=\Wrappedbreaksatpunct]% } \makeatother @@ -96,7 +96,7 @@ \definecolor{cellborder}{HTML}{CFCFCF} \definecolor{cellbackground}{HTML}{F7F7F7} ((*- endblock style_colors *)) - + % prompt \makeatletter \newcommand{\boxspacing}{\kern\kvtcb@left@rule\kern\kvtcb@boxsep} @@ -106,7 +106,7 @@ {\ttfamily\llap{{\color{#2}[#3]:\hspace{3pt}#4}}\vspace{-\baselineskip}} } ((* endblock style_prompt *)) - + ((*- endblock definitions -*)) %=============================================================================== diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/markdown/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/markdown/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/markdown/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/markdown/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,6 @@ { - "base_template": "base", - "mimetypes": { - "text/markdown": true - } -} \ No newline at end of file + "base_template": "base", + "mimetypes": { + "text/markdown": true + } +} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/python/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/python/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/python/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/python/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,6 @@ { - "base_template": "base", - "mimetypes": { - "text/x-python": true - } -} \ No newline at end of file + "base_template": "base", + "mimetypes": { + "text/x-python": true + } +} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/reveal/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/reveal/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/reveal/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/reveal/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,16 +1,16 @@ { - "base_template": "lab", - "mimetypes": { - "text/html": true + "base_template": "lab", + "mimetypes": { + "text/html": true + }, + "preprocessors": { + "100-pygments": { + "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor", + "enabled": true }, - "preprocessors": { - "100-pygments": { - "type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor", - "enabled": true - }, - "500-reveal": { - "type": "nbconvert.exporters.slides._RevealMetadataPreprocessor", - "enabled": true - } + "500-reveal": { + "type": "nbconvert.exporters.slides._RevealMetadataPreprocessor", + "enabled": true } + } } diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/reveal/index.html.j2 nbconvert-6.5.3/share/jupyter/nbconvert/templates/reveal/index.html.j2 --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/reveal/index.html.j2 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/reveal/index.html.j2 2022-08-11 11:50:51.000000000 +0000 @@ -20,7 +20,7 @@ -{% set nb_title = nb.metadata.get('title', '') or resources['metadata']['name'] %} +{% set nb_title = nb.metadata.get('title', resources['metadata']['name']) | escape_html_keep_quotes %} {{nb_title}} slides {%- block html_head_js -%} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/reveal/static/custom_reveal.css nbconvert-6.5.3/share/jupyter/nbconvert/templates/reveal/static/custom_reveal.css --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/reveal/static/custom_reveal.css 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/reveal/static/custom_reveal.css 2022-08-11 11:50:51.000000000 +0000 @@ -2,6 +2,9 @@ .reveal { font-size: 160%; } +.reveal table { + font-size: var(--jp-ui-font-size1); +} .reveal pre { width: inherit; padding: 0.4em; @@ -45,6 +48,23 @@ margin: 5px 5px 0 0; } +.reveal div.highlight { + margin: 0; +} + +.reveal div.highlight > pre { + margin: 0; + width: 100%; + font-size: var(--jp-code-font-size); +} + +.reveal div.jp-OutputArea-output > pre { + margin: 0; + width: 90%; + font-size: var(--jp-code-font-size); + box-shadow: none; +} + /* Reveal navigation controls */ .reveal .controls .navigate-left, @@ -85,16 +105,13 @@ /* Scrollbars */ -::-webkit-scrollbar -{ +::-webkit-scrollbar { width: 6px; height: 6px; } -::-webkit-scrollbar * -{ - background:transparent; +::-webkit-scrollbar * { + background: transparent; } -::-webkit-scrollbar-thumb -{ +::-webkit-scrollbar-thumb { background: #727272 !important; } diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/rst/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/rst/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/rst/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/rst/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,6 @@ { - "base_template": "base", - "mimetypes": { - "text/restructuredtext": true - } -} \ No newline at end of file + "base_template": "base", + "mimetypes": { + "text/restructuredtext": true + } +} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/script/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/script/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/script/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/script/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,6 @@ { - "base_template": "base", - "mimetypes": { - "text/plain": true - } -} \ No newline at end of file + "base_template": "base", + "mimetypes": { + "text/plain": true + } +} diff -Nru nbconvert-6.4.4/share/jupyter/nbconvert/templates/webpdf/conf.json nbconvert-6.5.3/share/jupyter/nbconvert/templates/webpdf/conf.json --- nbconvert-6.4.4/share/jupyter/nbconvert/templates/webpdf/conf.json 2022-03-11 22:19:27.000000000 +0000 +++ nbconvert-6.5.3/share/jupyter/nbconvert/templates/webpdf/conf.json 2022-08-11 11:50:51.000000000 +0000 @@ -1,6 +1,6 @@ { - "base_template": "lab", - "mimetypes": { - "application/pdf": true - } + "base_template": "lab", + "mimetypes": { + "application/pdf": true + } }