refactor/add fill attr to io clozes

This commit is contained in:
llama 2025-06-02 19:35:57 +08:00
parent e886d87c53
commit 3b056c98d6
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -64,19 +64,9 @@ pub fn get_image_cloze_data(text: &str) -> String {
}
for property in occlusion.properties {
match property.name.as_str() {
"left" => {
"left" | "top" | "angle" | "fill" => {
if !property.value.is_empty() {
result.push_str(&format!("data-left=\"{}\" ", property.value));
}
}
"top" => {
if !property.value.is_empty() {
result.push_str(&format!("data-top=\"{}\" ", property.value));
}
}
"angle" => {
if !property.value.is_empty() {
result.push_str(&format!("data-angle=\"{}\" ", property.value));
result.push_str(&format!("data-{}=\"{}\" ", property.name, property.value));
}
}
"width" => {