{"id":16851891,"url":"https://github.com/cad97/colored-diff","last_synced_at":"2025-03-17T05:32:09.243Z","repository":{"id":46641002,"uuid":"135868284","full_name":"CAD97/colored-diff","owner":"CAD97","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-20T22:58:19.000Z","size":86,"stargazers_count":17,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T18:14:02.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CAD97.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-03T02:49:23.000Z","updated_at":"2024-04-30T18:44:52.000Z","dependencies_parsed_at":"2022-08-20T05:00:37.032Z","dependency_job_id":null,"html_url":"https://github.com/CAD97/colored-diff","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Fcolored-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Fcolored-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Fcolored-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAD97%2Fcolored-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CAD97","download_url":"https://codeload.github.com/CAD97/colored-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846976,"owners_count":20357294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T13:34:00.305Z","updated_at":"2025-03-17T05:32:08.898Z","avatar_url":"https://github.com/CAD97.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# colored-diff\n\nShow colored differences between source strings!\n\nInspired by / extracted from [pretty-assertions](https://github.com/colin-kiegel/rust-pretty-assertions)\nand [difference's github-style example](https://github.com/johannhof/difference.rs/blob/master/examples/github-style.rs)\n\nPowershell:  \n![Powershell Example](.github/example-ps.png)\n\nCommand Prompt:  \n![Command Prompt Example](.github/example-cmd.png)\n\n(Now accepting PRs for a macOS Terminal and/or Ubuntu (whatever console window) examples!)\n\n[Poem Example](examples/poem.rs):\n\n```rust\nlet expected = \"\\\n    Roses are red, violets are blue,\\n\\\n    I wrote this library here,\\n\\\n    just for you.\\n\\\n    (It's true).\\n\\\n\";\nlet actual = \"\\\n    Roses are red, violets are blue,\\n\\\n    I wrote this documentation here,\\n\\\n    just for you.\\n\\\n    (It's quite true).\\n\\\n\";\n\nprintln!(\"{}\", colored_diff::PrettyDifference { expected, actual })\n```\n\n[Pretty-Assertions Example](examples/pretty_assertions.rs):\n\n```rust\n#[derive(Debug, PartialEq)]\nstruct Foo {\n    lorem: \u0026'static str,\n    ipsum: u32,\n    dolor: Result\u003cString, String\u003e,\n}\n\nlet x = Some(Foo { lorem: \"Hello World!\", ipsum: 42, dolor: Ok(\"hey\".to_string())});\nlet y = Some(Foo { lorem: \"Hello Wrold!\", ipsum: 42, dolor: Ok(\"hey ho!\".to_string())});\n\nlet x = format!(\"{:#?}\", x);\nlet y = format!(\"{:#?}\", y);\n\nprintln!(\"{}\", colored_diff::PrettyDifference { expected: \u0026x, actual: \u0026y })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcad97%2Fcolored-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcad97%2Fcolored-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcad97%2Fcolored-diff/lists"}