diff --git a/CHANGELOG.md b/CHANGELOG.md index 50358c9b..958510d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ (Suggested by Brad Weslake) +* Handle errors raised when loading missing templating engine. + + When a templating engine is removed from the Tilt library (as recently + happened with Maruku), Ruby was raising a `NameError` exception when Nesta + attempted to load it. Nesta now ignores those errors, and tries to load + another Markdown processor. + + (Graham Ashton, reported by Curtis Cooley) + * Fix whitespace in version.rb when generating new plugins. (Graham Ashton) ## 0.18.0 (19 November 2024) diff --git a/lib/nesta/models/file_model.rb b/lib/nesta/models/file_model.rb index ec54ad4a..d31d90b1 100644 --- a/lib/nesta/models/file_model.rb +++ b/lib/nesta/models/file_model.rb @@ -1,6 +1,6 @@ def register_template_handler(class_name, *extensions) Tilt.register Tilt.const_get(class_name), *extensions -rescue LoadError +rescue LoadError, NameError # Only one of the Markdown processors needs to be available, so we can # safely ignore these load errors. end