Skip to content

Commit 8d55075

Browse files
authored
fix: Some builder have no entry in translation_handlers (#15)
1 parent e385792 commit 8d55075

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/sphinxnotes/strike/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ def _is_supported_builder(builder: Builder) -> bool:
8989
return True # NOTE: Compatible with version 1.2.
9090

9191
# a dict of builder name -> dict of node name -> visitor and departure functions
92-
handlers = builder.app.registry.translation_handlers[builder.name]
92+
handlers = builder.app.registry.translation_handlers.get(builder.name)
93+
if handlers is None:
94+
return False
9395
return handlers.get(strike_node.__name__) is not None
9496

9597

0 commit comments

Comments
 (0)