Skip to content

Commit

Permalink
fix: image resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
dancixx committed Nov 9, 2024
1 parent df7c3d0 commit e5cd287
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ pub async fn process_markdown(markdown: String) -> Result<String, ServerFnError>
let img_format = &img_cap[2];
let img_html = if img_format == "svg" {
format!(
r#"<div style="display: flex; justify-content: center;"><img src="{}" style="filter: invert(100%); width: 50%;"></div>"#,
r#"<div style="display: flex; justify-content: center;"><img src="{}" style="filter: invert(100%); width: 100%;"></div>"#,
img_path
)
} else {
format!(
r#"<div style="display: flex; justify-content: center;"><img src="{}" style="width: 50%;"></div>"#,
r#"<div style="display: flex; justify-content: center;"><img src="{}" style="width: 100%;"></div>"#,
img_path
)
};
Expand Down Expand Up @@ -337,12 +337,12 @@ pub async fn process_markdown(markdown: String) -> Result<String, ServerFnError>

let img_html = if img_format == "svg" {
format!(
r#"<div style="display: flex; justify-content: center;"><img alt="iamge" src="{}" style="filter: invert(100%); width: 50%;"></div>"#,
r#"<div style="display: flex; justify-content: center;"><img alt="iamge" src="{}" style="filter: invert(100%); width: 100%;"></div>"#,
img_path
)
} else {
format!(
r#"<div style="display: flex; justify-content: center;"><img alt="iamge" src="{}" style="width: 50%;"></div>"#,
r#"<div style="display: flex; justify-content: center;"><img alt="iamge" src="{}" style="width: 100%;"></div>"#,
img_path
)
};
Expand Down

0 comments on commit e5cd287

Please sign in to comment.