markdown-exec 1.10.2__py3-none-any.whl → 1.10.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
markdown_exec/__init__.py CHANGED
@@ -12,7 +12,6 @@ from markdown_exec._internal.formatters.base import (
12
12
  )
13
13
  from markdown_exec._internal.logger import get_logger, patch_loggers
14
14
  from markdown_exec._internal.main import MARKDOWN_EXEC_AUTO, formatter, formatters, validator
15
- from markdown_exec._internal.mkdocs_plugin import MarkdownExecPlugin, MarkdownExecPluginConfig
16
15
  from markdown_exec._internal.processors import (
17
16
  HeadingReportingTreeprocessor,
18
17
  IdPrependingTreeprocessor,
@@ -36,8 +35,6 @@ __all__ = [
36
35
  "InsertHeadings",
37
36
  "MarkdownConfig",
38
37
  "MarkdownConverter",
39
- "MarkdownExecPlugin",
40
- "MarkdownExecPluginConfig",
41
38
  "RemoveHeadings",
42
39
  "add_source",
43
40
  "base_format",
@@ -53,3 +50,14 @@ __all__ = [
53
50
  "validator",
54
51
  "working_directory",
55
52
  ]
53
+
54
+
55
+ try:
56
+ from markdown_exec._internal.mkdocs_plugin import MarkdownExecPlugin, MarkdownExecPluginConfig
57
+ except ImportError:
58
+ pass
59
+ else:
60
+ __all__ += [
61
+ "MarkdownExecPlugin",
62
+ "MarkdownExecPluginConfig",
63
+ ]
@@ -16,7 +16,7 @@ function clearOutput(element) {
16
16
  }
17
17
 
18
18
  async function evaluatePython(pyodide, editor, output, session) {
19
- pyodide.setStdout({ batched: (string) => { writeOutput(output, string); } });
19
+ pyodide.setStdout({ batched: (string) => { writeOutput(output, new Option(string).innerHTML); } });
20
20
  let result, code = editor.getValue();
21
21
  clearOutput(output);
22
22
  try {
@@ -101,6 +101,8 @@ async function setupPyodide(idPrefix, install = null, themeLight = 'tomorrow', t
101
101
  writeOutput(output, `Could not install one or more packages: ${install.join(", ")}\n`);
102
102
  writeOutput(output, new Option(error.toString()).innerHTML);
103
103
  }
104
+ } else {
105
+ clearOutput(output);
104
106
  }
105
107
  run.onclick = () => evaluatePython(pyodide, editor, output, session);
106
108
  clear.onclick = () => clearOutput(output);
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown-exec
3
- Version: 1.10.2
3
+ Version: 1.10.4
4
4
  Summary: Utilities to execute code blocks in Markdown files.
5
5
  Keywords: markdown,python,exec,shell,bash,mkdocs
6
6
  Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
@@ -1,8 +1,8 @@
1
- markdown_exec-1.10.2.dist-info/METADATA,sha256=p_03bcEee3LVhFXFkmBPpnEa2kXPtRxHJLmhst3j-L4,4967
2
- markdown_exec-1.10.2.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- markdown_exec-1.10.2.dist-info/entry_points.txt,sha256=fjbdFnhAdp5BS5JSD_VVuTX4Kz9ZjWMqg3QcxOrKuw8,101
4
- markdown_exec-1.10.2.dist-info/licenses/LICENSE,sha256=eZQBcJKqlN0QepmOi0u09hlqKMPFdzWjY6NUWYeJGZs,754
5
- markdown_exec/__init__.py,sha256=yS0iGXTaZvvPUYC2ZgpAzYJqwxtvHe9Yr__r2sjB8ig,1341
1
+ markdown_exec-1.10.4.dist-info/METADATA,sha256=5aMfKmPj6jlKlN18mbrKj2QLkPft1ne7LIhXpFKqvvI,4967
2
+ markdown_exec-1.10.4.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ markdown_exec-1.10.4.dist-info/entry_points.txt,sha256=fjbdFnhAdp5BS5JSD_VVuTX4Kz9ZjWMqg3QcxOrKuw8,101
4
+ markdown_exec-1.10.4.dist-info/licenses/LICENSE,sha256=eZQBcJKqlN0QepmOi0u09hlqKMPFdzWjY6NUWYeJGZs,754
5
+ markdown_exec/__init__.py,sha256=aKNztsrnJH00cd0ql0osJXFj0X_pqzWQHrqfFsF-q14,1418
6
6
  markdown_exec/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  markdown_exec/_internal/debug.py,sha256=bdTv2PPqPKMxvFlQI4LDkVddGp1_EO6HY3brvdXqzsU,2827
8
8
  markdown_exec/_internal/formatters/__init__.py,sha256=BiGAHQU1_x75VeGVipSgGvxOabYnMaaVt6b7owTS1NY,47
@@ -23,7 +23,7 @@ markdown_exec/_internal/processors.py,sha256=hu_occeaz2SymdREwHul-boniv42RfNkY84
23
23
  markdown_exec/_internal/rendering.py,sha256=aCLsbWcez5Mbp3SBYQaqhVCehX_cchCAMuvxp5AzknA,9599
24
24
  markdown_exec/assets/ansi.css,sha256=6PTJxTSsExVgPbMySCuKjih0gr-fdfx2aZ9--u7zWf0,8090
25
25
  markdown_exec/assets/pyodide.css,sha256=lan5A3qEGA4ABTrXPOWJX8kezQp7naH305NKVTSObhM,954
26
- markdown_exec/assets/pyodide.js,sha256=-7_W_7lTz2nUNixWbpgleDnr109Ca9TTSKJ9VzgdoJE,4176
26
+ markdown_exec/assets/pyodide.js,sha256=g5eWWVP7-8mA2DQvj-a34I167CRP7yMAVykR13CUWp4,4240
27
27
  markdown_exec/formatters/__init__.py,sha256=bH4xBv9gRcYMvDYvW2yEK9AMl-tpXKJ8XifxCxHTJCc,429
28
28
  markdown_exec/formatters/base.py,sha256=tYWDIAgopl7P3cIJllXcf9j2ruFl9vKqk2_ZGUz4YvM,433
29
29
  markdown_exec/formatters/bash.py,sha256=EtAbQrAsLCRfTbdB-b_5dOJvw-Bxkw7MT9F7RFusve0,433
@@ -39,4 +39,4 @@ markdown_exec/mkdocs_plugin.py,sha256=jwYOBaHDaDsKVC7RuvCQaFWqTQWQWYtojEUb0RhOnf
39
39
  markdown_exec/processors.py,sha256=m4bm4d23X4RMh9mVgYuIxfJZnS4HwlY4Te3UMLpyjBA,429
40
40
  markdown_exec/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  markdown_exec/rendering.py,sha256=bsetG1hv6S_VcF4ZqtqTMTOhgEs2RmYVNCaK4MqiDx4,426
42
- markdown_exec-1.10.2.dist-info/RECORD,,
42
+ markdown_exec-1.10.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.3)
2
+ Generator: pdm-backend (2.4.4)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any