Skip to content

Commit

Permalink
pre-check: add cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaoboy committed Oct 18, 2024
1 parent eebd9b0 commit da3d231
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ansi2/src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn to_html<S: AsRef<str>>(
let s = str.as_ref();
let canvas = Canvas::new(s, width);
let mut s = String::new();
let style = to_style(theme, CssType::Html, mode, light_bg,dark_bg);
let style = to_style(theme, CssType::Html, mode, light_bg, dark_bg);
let mut font_style = "".into();
let mut font_family = "Consolas,Courier New,Monaco".into();

Expand Down Expand Up @@ -59,8 +59,8 @@ pub fn to_html<S: AsRef<str>>(
text_class.push("underline".into());
}
if c.hide {
text_class.push("hide".into());
}
text_class.push("hide".into());
}
if !c.color.is_default() {
let name = c.color.name();
text_class.push(name);
Expand Down
2 changes: 1 addition & 1 deletion ansi2/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn to_svg<S: AsRef<str>>(
let fn_h = 32;
let baseline_h = 16;
let mut cur_y = 0;
let style = to_style(theme, CssType::Svg, mode,light_bg,dark_bg);
let style = to_style(theme, CssType::Svg, mode, light_bg, dark_bg);
let mut font_style = "".into();
let mut font_family = "Consolas,Courier New,Monaco".into();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"pre-check": "cargo clippy --fix --allow-dirty --allow-staged && npm run format && npm run lint:fix",
"pre-check": "cargo fmt && cargo clippy --fix --allow-dirty --allow-staged && npm run format && npm run lint:fix",
"format": "biome format --write ./",
"lint:fix": "biome lint ./ --write --unsafe"
},
Expand Down

0 comments on commit da3d231

Please sign in to comment.