\ No newline at end of file
diff --git a/tests/data/html/audio-no_caption.html b/tests/data/html/audio-no_caption.html
index 7bd5782..2089158 100644
--- a/tests/data/html/audio-no_caption.html
+++ b/tests/data/html/audio-no_caption.html
@@ -1,4 +1,4 @@
-
\ No newline at end of file
diff --git a/tests/data/html/data_attributes.html b/tests/data/html/data_attributes.html
index 96b2849..3f8a132 100644
--- a/tests/data/html/data_attributes.html
+++ b/tests/data/html/data_attributes.html
@@ -1 +1 @@
-
Cute KittyNew Kitty
\ No newline at end of file
+
Cute KittyNew Kitty
\ No newline at end of file
diff --git a/tests/data/html/document-is_renderable.html b/tests/data/html/document-is_renderable.html
index 9ee1d5e..184f0af 100644
--- a/tests/data/html/document-is_renderable.html
+++ b/tests/data/html/document-is_renderable.html
@@ -1 +1 @@
-
Quick brown fox jumps over the lazy dog.
+
Quick brown fox jumps over the lazy dog.
\ No newline at end of file
diff --git a/tests/data/html/document-pdf.html b/tests/data/html/document-pdf.html
index 77c3e20..3f5b6fa 100644
--- a/tests/data/html/document-pdf.html
+++ b/tests/data/html/document-pdf.html
@@ -13,7 +13,7 @@
\ No newline at end of file
diff --git a/tests/data/html/document-sketch.html b/tests/data/html/document-sketch.html
index 8eb2241..a0a9913 100644
--- a/tests/data/html/document-sketch.html
+++ b/tests/data/html/document-sketch.html
@@ -13,7 +13,7 @@
\ No newline at end of file
diff --git a/tests/data/html/featuredimage-height_width.html b/tests/data/html/featuredimage-height_width.html
index 21e14b9..dc801b6 100644
--- a/tests/data/html/featuredimage-height_width.html
+++ b/tests/data/html/featuredimage-height_width.html
@@ -1 +1 @@
-Cute Kitty
\ No newline at end of file
+Cute Kitty
\ No newline at end of file
diff --git a/tests/data/html/featuredimage-is_renderable.html b/tests/data/html/featuredimage-is_renderable.html
index 9ee1d5e..184f0af 100644
--- a/tests/data/html/featuredimage-is_renderable.html
+++ b/tests/data/html/featuredimage-is_renderable.html
@@ -1 +1 @@
-
Quick brown fox jumps over the lazy dog.
+
Quick brown fox jumps over the lazy dog.
\ No newline at end of file
diff --git a/tests/data/html/featuredimage-mime_type.html b/tests/data/html/featuredimage-mime_type.html
index 9863df0..7729028 100644
--- a/tests/data/html/featuredimage-mime_type.html
+++ b/tests/data/html/featuredimage-mime_type.html
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/tests/data/html/featuredimage-missing_caption.html b/tests/data/html/featuredimage-missing_caption.html
index 8422fe7..c9b5d16 100644
--- a/tests/data/html/featuredimage-missing_caption.html
+++ b/tests/data/html/featuredimage-missing_caption.html
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/tests/data/html/featuredimage-no_caption.html b/tests/data/html/featuredimage-no_caption.html
index 8422fe7..c9b5d16 100644
--- a/tests/data/html/featuredimage-no_caption.html
+++ b/tests/data/html/featuredimage-no_caption.html
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/tests/data/html/featuredimage.html b/tests/data/html/featuredimage.html
index 946f713..eb743a3 100644
--- a/tests/data/html/featuredimage.html
+++ b/tests/data/html/featuredimage.html
@@ -1 +1 @@
-Cute Kitty
+Cute Kitty
\ No newline at end of file
diff --git a/tests/data/html/heading.html b/tests/data/html/heading.html
index 54b327a..e1ef8d9 100644
--- a/tests/data/html/heading.html
+++ b/tests/data/html/heading.html
@@ -1 +1 @@
-
This is a word
+
This is a word
\ No newline at end of file
diff --git a/tests/data/html/image-height_width.html b/tests/data/html/image-height_width.html
index 0583d79..a458c92 100644
--- a/tests/data/html/image-height_width.html
+++ b/tests/data/html/image-height_width.html
@@ -1 +1 @@
-Cute Kitty
\ No newline at end of file
+Cute Kitty
\ No newline at end of file
diff --git a/tests/data/html/image-is_renderable.html b/tests/data/html/image-is_renderable.html
index 9ee1d5e..184f0af 100644
--- a/tests/data/html/image-is_renderable.html
+++ b/tests/data/html/image-is_renderable.html
@@ -1 +1 @@
-
Quick brown fox jumps over the lazy dog.
+
Quick brown fox jumps over the lazy dog.
\ No newline at end of file
diff --git a/tests/data/html/image-mime_type.html b/tests/data/html/image-mime_type.html
index 661b14b..5c22f9a 100644
--- a/tests/data/html/image-mime_type.html
+++ b/tests/data/html/image-mime_type.html
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/tests/data/html/image-missing_caption.html b/tests/data/html/image-missing_caption.html
index 17ff431..21d756b 100644
--- a/tests/data/html/image-missing_caption.html
+++ b/tests/data/html/image-missing_caption.html
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/tests/data/html/image-no_caption.html b/tests/data/html/image-no_caption.html
index 17ff431..21d756b 100644
--- a/tests/data/html/image-no_caption.html
+++ b/tests/data/html/image-no_caption.html
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/tests/data/html/image.html b/tests/data/html/image.html
index 7bb07f8..36d73b5 100644
--- a/tests/data/html/image.html
+++ b/tests/data/html/image.html
@@ -1 +1 @@
-<script>alert(23)</script>Cute Kitty
+<script>alert(23)</script>Cute Kitty
\ No newline at end of file
diff --git a/tests/data/html/mark_tags.html b/tests/data/html/mark_tags.html
index bce70c6..fae3437 100644
--- a/tests/data/html/mark_tags.html
+++ b/tests/data/html/mark_tags.html
@@ -1 +1 @@
-
This is bold text, this is italic text, this is <script>alert('hello');</script> italic and bold text and this has a link
\ No newline at end of file
+
This is bold text, this is italic text, this is <script>alert('hello');</script> italic and bold text and this has a link
\ No newline at end of file
diff --git a/tests/data/html/ordered_list.html b/tests/data/html/ordered_list.html
index 0549f97..af4a6d7 100644
--- a/tests/data/html/ordered_list.html
+++ b/tests/data/html/ordered_list.html
@@ -1 +1 @@
-
Scroll
One
Two
Three
One
Two
Three
+
Scroll
One
Two
Three
One
Two
Three
\ No newline at end of file
diff --git a/tests/test_transform.py b/tests/test_transform.py
index bccf3a3..d3b3de7 100644
--- a/tests/test_transform.py
+++ b/tests/test_transform.py
@@ -1,7 +1,8 @@
import os
+
import pytest
-import tiptapy
+import tiptapy
tags_to_test = (
"simple",
@@ -41,7 +42,7 @@
"document-is_renderable",
"document-sketch",
"camel-case",
- "data_attributes"
+ "data_attributes",
)
@@ -49,6 +50,7 @@ class config:
"""
Config class to store constans which are used by the othe nodes.
"""
+
DOMAIN = "python.org"
@@ -56,15 +58,15 @@ def build_test_data():
"""
Scan data directories and return test data
"""
- store = {'json': {}, 'html': {}}
+ store = {"json": {}, "html": {}}
for data_type in store:
- dir_path = os.path.abspath(f'tests/data/{data_type}/')
+ dir_path = os.path.abspath(f"tests/data/{data_type}/")
for file in os.listdir(dir_path):
file_path = os.path.join(dir_path, file)
with open(file_path) as f:
data = f.read()
- store[data_type][file.split(f'.{data_type}')[0]] = data
- return store['json'], store['html']
+ store[data_type][file.split(f".{data_type}")[0]] = data
+ return store["json"], store["html"]
json_data, html_data = build_test_data()
diff --git a/tiptapy/__init__.py b/tiptapy/__init__.py
index 39f8180..3f3a575 100644
--- a/tiptapy/__init__.py
+++ b/tiptapy/__init__.py
@@ -33,7 +33,7 @@ def init_env(path, config):
env.globals["escape"] = escape
env.globals["get_audio_player_block"] = get_audio_player_block
env.globals["get_doc_block"] = get_doc_block
- env.globals["quote_plus"] = quote_plus
+ env.filters["quote_plus"] = quote_plus
return env