nbsync 0.3.3__py3-none-any.whl → 0.3.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.
nbsync/cell.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import html
|
3
4
|
import textwrap
|
4
5
|
import uuid
|
5
6
|
from dataclasses import dataclass
|
@@ -26,7 +27,7 @@ class Cell:
|
|
26
27
|
content: bytes | str
|
27
28
|
"""The content of the image."""
|
28
29
|
|
29
|
-
def convert(self) -> str:
|
30
|
+
def convert(self, *, escape: bool = False) -> str:
|
30
31
|
kind = self.image.attributes.pop("source", "")
|
31
32
|
tabs = self.image.attributes.pop("tabs", "")
|
32
33
|
identifier = self.image.attributes.pop("identifier", "")
|
@@ -51,6 +52,8 @@ class Cell:
|
|
51
52
|
)
|
52
53
|
result, self.image.url = self.content, ""
|
53
54
|
result = result.rstrip()
|
55
|
+
if escape and self.mime == "text/plain":
|
56
|
+
result = html.escape(result)
|
54
57
|
|
55
58
|
else:
|
56
59
|
source = get_source(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nbsync
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.4
|
4
4
|
Summary: A core library to synchronize Jupyter notebooks and Markdown documents, enabling seamless integration and dynamic content execution
|
5
5
|
Project-URL: Documentation, https://daizutabi.github.io/nbsync/
|
6
6
|
Project-URL: Source, https://github.com/daizutabi/nbsync
|
@@ -1,11 +1,11 @@
|
|
1
1
|
nbsync/__init__.py,sha256=3NuWx9D0LcBnXjEKrC-uypNDOz8rLWXI7mIjdN9xSeE,126
|
2
|
-
nbsync/cell.py,sha256=
|
2
|
+
nbsync/cell.py,sha256=bXzchf46DP0pxhgL1W98f9jfOGVJi4-EoK2b1RX0N1c,3921
|
3
3
|
nbsync/logger.py,sha256=snNRqi9xESj4B-Z9GQffCBlgqeVujvuXuBveWAebIWM,736
|
4
4
|
nbsync/markdown.py,sha256=xcPhQKWpFDyVQ_xtZCpFrnR0QED_hYs4PAyaT7dF3t4,3830
|
5
5
|
nbsync/notebook.py,sha256=4F3V1KDHfJnIR5ZSb1xWdN9JGiC6mWUVimXXK1BFsbc,1450
|
6
6
|
nbsync/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
nbsync/sync.py,sha256=vISzn8D_Dae-jdJABRnvvD02aL35bYIWx52OinAORVo,3990
|
8
|
-
nbsync-0.3.
|
9
|
-
nbsync-0.3.
|
10
|
-
nbsync-0.3.
|
11
|
-
nbsync-0.3.
|
8
|
+
nbsync-0.3.4.dist-info/METADATA,sha256=9TEbtLM655UYB7rQ7YoxFuSkrBodGzf4ox41Nz8tsEo,6552
|
9
|
+
nbsync-0.3.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
nbsync-0.3.4.dist-info/licenses/LICENSE,sha256=wy1pqn52upuo_qYwY-epWmspwE-3UWJso0xodciGXYc,1062
|
11
|
+
nbsync-0.3.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|