Skip to content

Commit

Permalink
add the set_alpha filter to the engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Davenchy committed Jul 26, 2024
1 parent 27b34c6 commit 844b1c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use upon::Value;

use crate::util::color;
use crate::util::color::color_to_string;
use crate::util::filters::set_lightness;
use crate::util::filters::{set_alpha, set_lightness};
use crate::util::variables::format_hook_text;

use std::fs::canonicalize;
Expand Down Expand Up @@ -302,6 +302,7 @@ fn export_template(

fn add_engine_filters(engine: &mut Engine) {
engine.add_filter("set_lightness", set_lightness);
engine.add_filter("set_alpha", set_alpha);
engine.add_filter("to_upper", str::to_uppercase);
engine.add_filter("to_lower", str::to_lowercase);
engine.add_filter("replace", |s: String, from: String, to: String| {
Expand Down

0 comments on commit 844b1c7

Please sign in to comment.