Properly handle songs with only English title
This commit is contained in:
parent
a33a05a60a
commit
86f81ccc35
2 changed files with 4 additions and 1 deletions
|
@ -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> {
|
||||
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"))))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue