Skip to content

Commit

Permalink
Fix: no call when method does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
danirus committed Nov 26, 2024
1 parent 3e15a78 commit f647b7e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## [0.2.2] - 2024-11-26

- Fix: prevent calling method `report_messages` if `HTML5Translator` does not have it. It is here for compat reasons.

## [0.2.1] - 2024-11-26

- Fix: destination directory was not properly referred to when copying images.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sphinx-colorschemed-images",
"version": "0.2.1",
"version": "0.2.2",
"description": "Include color-scheme aware images in Sphinx projects.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion sphinx_colorschemed_images/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .extension import copy_colorschemed_images, extension_builder_inited

__version__ = "0.2.1"
__version__ = "0.2.2"


def setup(app) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion sphinx_colorschemed_images/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def CS_visit_image(node):
atts["alt"] = alt
element = self.emptytag(node, "img", suffix, src=uri, **atts)
self.body.append(element)
if suffix: # block-element
if suffix and getattr(self, "report_messages", None): # block-element
self.report_messages(node)

# -----------------------------------------------------
Expand Down

0 comments on commit f647b7e

Please sign in to comment.