blurry-cli 0.22.2__tar.gz → 0.22.3__tar.gz
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.
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/PKG-INFO +1 -1
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/markdown/__init__.py +18 -16
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/pyproject.toml +1 -1
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/LICENSE +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/README.md +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/__main__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/async_typer.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/cli.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/commands/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/commands/clean.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/commands/init.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/commands/version.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/constants.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/file_processors/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/gather_file_data_by_directory.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/images.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/markdown/front_matter.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/markdown/renderer_functions/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/markdown/renderer_functions/render_video.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/open_graph.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/html_plugins/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/html_plugins/minify_html_plugin.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/jinja_plugins/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/jinja_plugins/blurry_image_extension.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/jinja_plugins/filters.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/markdown_plugins/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/markdown_plugins/container_plugin.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/markdown_plugins/punctuation_plugin.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/markdown_plugins/python_code_plugin.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/py.typed +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/runserver_handlers.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/schema_validation/__init__.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/schema_validation/models.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/settings.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/sitemap.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/templates.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/types.py +0 -0
- {blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/utils.py +0 -0
|
@@ -101,7 +101,6 @@ class BlurryRenderer(mistune.HTMLRenderer):
|
|
|
101
101
|
return f"<img {attributes_str}>"
|
|
102
102
|
|
|
103
103
|
image_widths = get_widths_for_image_width(image_width)
|
|
104
|
-
|
|
105
104
|
sizes = generate_sizes_string(image_widths)
|
|
106
105
|
# Use AVIF for all remaining images, except WEBP
|
|
107
106
|
new_extension = "webp" if src.endswith(".webp") else "avif"
|
|
@@ -155,25 +154,28 @@ def is_blurry_renderer(
|
|
|
155
154
|
return isinstance(renderer, BlurryRenderer)
|
|
156
155
|
|
|
157
156
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
)
|
|
157
|
+
def get_markdown_instance():
|
|
158
|
+
renderer = BlurryRenderer(escape=False)
|
|
159
|
+
markdown = mistune.Markdown(
|
|
160
|
+
renderer,
|
|
161
|
+
# Ignoring types because the renderer is expecting markdown: Markdown rather than md: Markdown
|
|
162
|
+
plugins=[ # type: ignore
|
|
163
|
+
abbr,
|
|
164
|
+
def_list,
|
|
165
|
+
footnotes,
|
|
166
|
+
strikethrough,
|
|
167
|
+
table,
|
|
168
|
+
task_lists,
|
|
169
|
+
url,
|
|
170
|
+
]
|
|
171
|
+
+ [plugin.load() for plugin in discovered_markdown_plugins],
|
|
172
|
+
)
|
|
173
|
+
return markdown
|
|
173
174
|
|
|
174
175
|
|
|
175
176
|
def convert_markdown_file_to_html(filepath: Path) -> tuple[str, dict[str, Any]]:
|
|
176
177
|
CONTENT_DIR = get_content_directory()
|
|
178
|
+
markdown = get_markdown_instance()
|
|
177
179
|
if not markdown.renderer:
|
|
178
180
|
raise Exception("Blurry markdown renderer not set on Mistune Markdown instance")
|
|
179
181
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/jinja_plugins/blurry_image_extension.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/markdown_plugins/punctuation_plugin.py
RENAMED
|
File without changes
|
{blurry_cli-0.22.2 → blurry_cli-0.22.3}/blurry/plugins/markdown_plugins/python_code_plugin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|