Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/nbconvert/exporters/asciidoc.py: 61%
23 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 06:10 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-03 06:10 +0000
1"""ASCIIDoc Exporter class"""
3# Copyright (c) Jupyter Development Team.
4# Distributed under the terms of the Modified BSD License.
6from traitlets import default
7from traitlets.config import Config
9from .templateexporter import TemplateExporter
12class ASCIIDocExporter(TemplateExporter):
13 """
14 Exports to an ASCIIDoc document (.asciidoc)
15 """
17 @default("file_extension")
18 def _file_extension_default(self):
19 return ".asciidoc"
21 @default("template_name")
22 def _template_name_default(self):
23 return "asciidoc"
25 output_mimetype = "text/asciidoc"
26 export_from_notebook = "AsciiDoc"
28 @default("raw_mimetypes")
29 def _raw_mimetypes_default(self):
30 return ["text/asciidoc/", "text/markdown", "text/html", ""]
32 @property
33 def default_config(self):
34 c = Config(
35 {
36 "NbConvertBase": {
37 "display_data_priority": [
38 "text/html",
39 "text/markdown",
40 "image/svg+xml",
41 "image/png",
42 "image/jpeg",
43 "text/plain",
44 "text/latex",
45 ]
46 },
47 "ExtractOutputPreprocessor": {"enabled": True},
48 "HighlightMagicsPreprocessor": {"enabled": True},
49 }
50 )
51 if super().default_config:
52 c2 = super().default_config.copy()
53 c2.merge(c)
54 c = c2
55 return c