|
|
@ -16,6 +16,9 @@ pub fn furigana_to_html(text: &str) -> String {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn furigana_filter(value: &Value, _args: &HashMap<String, Value>) -> tera::Result<Value> {
|
|
|
|
pub fn furigana_filter(value: &Value, _args: &HashMap<String, Value>) -> tera::Result<Value> {
|
|
|
|
|
|
|
|
if value.is_null() {
|
|
|
|
|
|
|
|
return Ok(Value::String("".to_string()));
|
|
|
|
|
|
|
|
}
|
|
|
|
Ok(Value::String(furigana_to_html(value.as_str().expect("The furigana input must be a string"))))
|
|
|
|
Ok(Value::String(furigana_to_html(value.as_str().expect("The furigana input must be a string"))))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|