-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add year function and fix bug where lang IDs wouldn't be found sometimes
- Loading branch information
Showing
9 changed files
with
49 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2024 Jack Bennett. | ||
* All Rights Reserved. | ||
* | ||
* See the LICENCE file for more information. | ||
*/ | ||
|
||
use tera::Tera; | ||
|
||
#[macro_use] | ||
pub mod fn_utils; | ||
pub mod fn_decls; | ||
|
||
mod language_specifics; | ||
|
||
/// Register all functions and filters onto the given Tera context | ||
pub fn register_functions(tera: &mut Tera) { | ||
tera.register_function("year", fn_decls::year()); | ||
tera.register_function("licence", fn_decls::licence()); | ||
tera.register_function("lang_by_filename", fn_decls::lang_by_filename()); | ||
tera.register_function("comment_by_lang", fn_decls::comment_by_lang()); | ||
|
||
tera.register_filter("wrap", fn_decls::wrap()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters