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
For my project (https://github.com/ayourtch/rsp10)
I would like to embed into the framework code the default formatting of the html elements, which implies that any partial under html/* would need to be loaded from within the framework rather than the file on disk..
Is that something that you might consider interesting to merge ? If no - then please discard the rest of this text :-)
One option seems to make a PartialsMap a trait, and abstract both the HashMap and the code to supply the text of the partials in there..
Another option is to allow to specify a closure Fn(&str)->Result, which would be called first and return Err to trigger the current behavior of loading from files...
Is either of these two acceptable ? Or there is some other approach ?
Thanks!
The text was updated successfully, but these errors were encountered:
adri326
added a commit
to adri326/rust-mustache
that referenced
this issue
Jul 27, 2022
This fixes a few issues:
- nickel-org#67
- nickel-org#62 (by implementing
a custom PartialLoader without the set_extension)
But it also adds a lot of complexity and breaks previous code.
For my project (https://github.com/ayourtch/rsp10)
I would like to embed into the framework code the default formatting of the html elements, which implies that any partial under html/* would need to be loaded from within the framework rather than the file on disk..
Is that something that you might consider interesting to merge ? If no - then please discard the rest of this text :-)
If yes:
In particular, I plan to refactor out this bit: https://github.com/nickel-org/rust-mustache/blob/master/src/compiler.rs#L66..L90
Into something more pluggable.
One option seems to make a PartialsMap a trait, and abstract both the HashMap and the code to supply the text of the partials in there..
Another option is to allow to specify a closure Fn(&str)->Result, which would be called first and return Err to trigger the current behavior of loading from files...
Is either of these two acceptable ? Or there is some other approach ?
Thanks!
The text was updated successfully, but these errors were encountered: