You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would result in all files ending in.hbs.html to be loaded. After upgrading, this breaks, as now, Path::extension is used to determine the extension:
Thus, in the example above, no files would ever match, since Path::extension considers html as the extension.
The documentation doesn't mention anything regarding the format of extension.
If my use-case is invalid, then the docs should at least mention that extension must never contain a . (excluding the first character), or that Path::extension will be used to determine the extension. Furthermore, the changelog could mention, that this previously accepted but invalid use will no longer work.
The text was updated successfully, but these errors were encountered:
hello @Nerixyz , your use case should be accepted by handlebars registry. Unfortunately our tests did not cover this case. Let's treat it as a bug and I'm going to fix it in 4.3.x releases.
Upgrading from version 4.2.2 to 4.3.0, specifically because of #500 (580acba), might result in
register_templates_directory
not working identically.In v4.2.2, you could register files with an extension that contained multiple
.
's:This would result in all files ending in
.hbs.html
to be loaded. After upgrading, this breaks, as now,Path::extension
is used to determine the extension:handlebars-rust/src/registry.rs
Lines 311 to 316 in 74cf5a2
Thus, in the example above, no files would ever match, since
Path::extension
considershtml
as the extension.The documentation doesn't mention anything regarding the format of
extension
.If my use-case is invalid, then the docs should at least mention that
extension
must never contain a.
(excluding the first character), or thatPath::extension
will be used to determine the extension. Furthermore, the changelog could mention, that this previously accepted but invalid use will no longer work.The text was updated successfully, but these errors were encountered: