Skip to content

Commit

Permalink
Fix repro command JavaScript quoting, after addition of bash quoting
Browse files Browse the repository at this point in the history
We must use double-quotes for the outer quoting, to avoid collisions
with the single-quotes used for the inner quoting.

See b3faa37
  • Loading branch information
Hoolean committed Nov 11, 2024
1 parent 66ecdb4 commit 3732ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fontc_crater/src/ci/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ fn make_diff_report(

let repo_url = get_repo_url(target);
let ttx_command = target.repro_command(repo_url);
let onclick = format!("event.preventDefault(); copyText('{ttx_command}');",);
let onclick = format!("event.preventDefault(); copyText(\"{ttx_command}\");",);
let decoration = make_delta_decoration(*ratio, prev_ratio, More::IsBetter);
let changed_tag_list = list_different_tables(diff_details).unwrap_or_default();
let diff_table = format_diff_report_detail_table(diff_details, prev_details);
Expand Down Expand Up @@ -683,7 +683,7 @@ fn make_error_report_group_items<'a>(
let make_repro_command = |target: &Target| {
let url = get_repo_url(target);
let ttx_command = target.repro_command(url);
format!("event.preventDefault(); copyText('{ttx_command}');",)
format!("event.preventDefault(); copyText(\"{ttx_command}\");",)
};
html! {
@for (path, is_new) in paths_and_if_is_new_error {
Expand Down

0 comments on commit 3732ad6

Please sign in to comment.