edwh-editorjs 2.5.0a1__py3-none-any.whl → 2.5.0a3__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.
editorjs/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.5.0a1"
1
+ __version__ = "2.5.0a3"
editorjs/blocks.py CHANGED
@@ -13,7 +13,7 @@ import markdown2
13
13
 
14
14
  from .exceptions import TODO, Unreachable
15
15
  from .types import EditorChildData, MDChildNode
16
-
16
+ import html2markdown
17
17
 
18
18
  class EditorJSBlock(abc.ABC):
19
19
  @classmethod
@@ -173,6 +173,9 @@ class ParagraphBlock(EditorJSBlock):
173
173
  }
174
174
  )
175
175
 
176
+ # deal with bold etc:
177
+ text = html2markdown.convert(text)
178
+
176
179
  return f"{text}\n\n"
177
180
 
178
181
  @classmethod
@@ -245,7 +248,8 @@ class ParagraphBlock(EditorJSBlock):
245
248
 
246
249
  @classmethod
247
250
  def to_text(cls, node: MDChildNode) -> str:
248
- return default_to_text(node)
251
+ return process_styled_content(node)
252
+ # return default_to_text(node)
249
253
 
250
254
 
251
255
  @block("list")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: edwh-editorjs
3
- Version: 2.5.0a1
3
+ Version: 2.5.0a3
4
4
  Summary: EditorJS.py
5
5
  Project-URL: Homepage, https://github.com/educationwarehouse/edwh-EditorJS
6
6
  Author-email: SKevo <skevo.cw@gmail.com>, Robin van der Noord <robin.vdn@educationwarehouse.nl>
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Requires-Python: >=3.10
16
+ Requires-Dist: html2markdown
16
17
  Requires-Dist: humanize
17
18
  Requires-Dist: markdown2
18
19
  Requires-Dist: mdast
@@ -1,10 +1,10 @@
1
- editorjs/__about__.py,sha256=YLKqewJZL65Iqq73XcOTOPmBl9fywRqGC_-S7MYAKkE,24
1
+ editorjs/__about__.py,sha256=_Fi21vxW1-XrA5cHGBb0PFyoSSWodIDwtSp_YSMc2l8,24
2
2
  editorjs/__init__.py,sha256=-OHUf7ZXfkbdFB1r85eIjpHRfql-GCNUCKuBEdEt2Rc,58
3
- editorjs/blocks.py,sha256=rGonr0_ODCS5PK_wigI4rpHBwQXb7LZhXwcNJJEWnH8,28682
3
+ editorjs/blocks.py,sha256=g8doq2Fykv78Z8Vytgz5IT0cdhTDvadaSDUTAq97iRA,28822
4
4
  editorjs/core.py,sha256=4igv2l8Rm1S92kxKrIXGIUlNHh6pnjq8F28XQr91I9o,4510
5
5
  editorjs/exceptions.py,sha256=oKuWqi4CSnFGZfVZWtTZ2XZeHXm5xF-nAtX_1YLm6sI,230
6
6
  editorjs/helpers.py,sha256=q861o5liNibMTp-Ozay17taF7CTNsRe901lYhhxdwHg,73
7
7
  editorjs/types.py,sha256=W7IZWMWgzJaQulybIt0Gx5N63rVj4mEy73VJWo4VAQA,1029
8
- edwh_editorjs-2.5.0a1.dist-info/METADATA,sha256=PAVb54js3j2DF7P-K72xPCrwq3vw2rbss9_xwAx5RKc,998
9
- edwh_editorjs-2.5.0a1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
10
- edwh_editorjs-2.5.0a1.dist-info/RECORD,,
8
+ edwh_editorjs-2.5.0a3.dist-info/METADATA,sha256=6uJqNbhmqS6w0Y50xPOCA1J2lVJUDvOvs6yNDsY7tSE,1027
9
+ edwh_editorjs-2.5.0a3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
10
+ edwh_editorjs-2.5.0a3.dist-info/RECORD,,