Skip to content

Commit

Permalink
Prevent navigation on copy repro click
Browse files Browse the repository at this point in the history
  • Loading branch information
rsheeter committed Oct 17, 2024
1 parent 65a0703 commit 6347088
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fontc_crater/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To run in CI mode locally to play with the html output:
# clone git@github.com:googlefonts/fontc_crater.git somewhere, we'll assume at ../fontc_crater
# CI currently has it's own format for the repo list, use the file from ^

$ cargo run --release -p=fontc_crater -- ci ../fontc_crater/gf-repos-2024-08-12.json -o ../fontc_crater/results/ --html_only
$ cargo run --release -p=fontc_crater -- ci ../fontc_crater/gf-repos-2024-08-12.json -o ../fontc_crater/results/ --html-only

# Review ../fontc_crater/results/index.html (NOT ../fontc_crater/index.html)
```
Expand Down
4 changes: 2 additions & 2 deletions fontc_crater/src/ci/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ fn make_diff_report(
}

let repo_url = get_repo_url(path);
let repro_cmd = make_repro_cmd(repo_url, path);
let onclick = format!("event.preventDefault(); {};", make_repro_cmd(repo_url, path));
let decoration = make_delta_decoration(*ratio, prev_ratio, More::IsBetter);
let details = format_diff_report_details(diff_details, prev_details);
// avoid .9995 printing as 100%
Expand All @@ -324,7 +324,7 @@ fn make_diff_report(
span.font_path {
a href = (repo_url) { (path.display()) }
" ("
a href = "#" onclick = (repro_cmd) { "copy repro" }
a href = "" onclick = (onclick) { "copy repro" }
")"
}
span.diff_result { (ratio_fmt) " " (decoration) }
Expand Down

0 comments on commit 6347088

Please sign in to comment.