diff --git a/CHANGELOG.md b/CHANGELOG.md index f08ce2f..f454424 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# Version 1.1.0 - 2020-10-29 + +Git tag: `v1.1.0`. + +- Added favored links: by default, `https` link from `docs.rs` will be + transformed to their intra-doc links version. `intraconv` will assume such + links point to dependencies and as such can be safely transformed to + intra-doc links. If this is not the desired behaviour, see the `-f` flag. +- Added `--no-favored` (`-f`) to disable the behaviour described above. + # Version 1.0.1 Git tag: `v1.0.1`. diff --git a/Cargo.lock b/Cargo.lock index 20d85ca..8affebd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ dependencies = [ [[package]] name = "argh" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca1877e24cecacd700d469066e0160c4f8497cc5635367163f50c8beec820154" +checksum = "91792f088f87cdc7a2cfb1d617fa5ea18d7f1dc22ef0e1b5f82f3157cdc522be" dependencies = [ "argh_derive", "argh_shared", @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "argh_derive" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e742194e0f43fc932bcb801708c2b279d3ec8f527e3acda05a6a9f342c5ef764" +checksum = "c4eb0c0c120ad477412dc95a4ce31e38f2113e46bd13511253f79196ca68b067" dependencies = [ "argh_shared", "heck", @@ -43,13 +43,13 @@ dependencies = [ [[package]] name = "argh_shared" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ba68f4276a778591e36a0c348a269888f3a177c8d2054969389e3b59611ff5" +checksum = "781f336cc9826dbaddb9754cb5db61e64cab4f69668bd19dcc4a0394a86f4cb1" [[package]] name = "cargo-intraconv" -version = "1.0.1" +version = "1.1.0" dependencies = [ "ansi_term", "argh", @@ -74,9 +74,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "memchr" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "proc-macro2" @@ -116,9 +116,9 @@ checksum = "8cab7a364d15cde1e505267766a2d3c4e22a843e1a601f0fa7564c0f82ced11c" [[package]] name = "syn" -version = "1.0.44" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e03e57e4fcbfe7749842d53e24ccb9aa12b7252dbe5e91d2acad31834c8b8fdd" +checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7291762..118928e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-intraconv" -version = "1.0.1" +version = "1.1.0" authors = ["Alexis Bourget "] edition = "2018" description = "A simple helper to transform Markdown links to intra-doc links in Rust projects when appropriate." @@ -10,6 +10,7 @@ homepage = "https://github.com/poliorcetics/cargo-intraconv" repository = "https://github.com/poliorcetics/cargo-intraconv" readme = "README.md" keywords = ["intra-doc-links", "documentation"] +# See https://crates.io/category_slugs. categories = ["command-line-utilities", "development-tools", "development-tools::cargo-plugins"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/transform/tests.rs b/src/transform/tests.rs index 758a308..d234f92 100644 --- a/src/transform/tests.rs +++ b/src/transform/tests.rs @@ -58,7 +58,8 @@ mod regexes { let string = "/// [name 1]: https://docs.rs/name_2-3/1.2.3/name_2_3/struct.Test.html\n"; assert!(HTTP_LINK.is_match(string)); - let string = "/// [name 1]: https://docs.rs/name_2-3/1.2.3/name_2_3/module/struct.Test.html\n"; + let string = + "/// [name 1]: https://docs.rs/name_2-3/1.2.3/name_2_3/module/struct.Test.html\n"; assert!(HTTP_LINK.is_match(string)); let string = "[`name 1`]: https://docs.rs/name-1/293-fdsf/name_1/index.html\n"; @@ -67,7 +68,8 @@ mod regexes { let string = "[name 1]: https://docs.rs/name_2-3/1.2.3/name_2_3/struct.Test.html\n"; assert!(HTTP_LINK.is_match(string)); - let string = "[name 1]: https://docs.rs/name_2-3/1.2.3/name_2_3/module/struct.Test.html\n"; + let string = + "[name 1]: https://docs.rs/name_2-3/1.2.3/name_2_3/module/struct.Test.html\n"; assert!(HTTP_LINK.is_match(string)); } } @@ -349,7 +351,7 @@ fn new() { assert_ne!(Context::new("name".into(), true, true), ctx); assert_ne!(Context::new("name".into(), true, false), ctx); assert_ne!(Context::new("name".into(), false, false), ctx); - + assert_ne!(Context::new("not_name".into(), true, true), ctx); assert_ne!(Context::new("not_name".into(), true, false), ctx); assert_ne!(Context::new("not_name".into(), false, true), ctx); @@ -1804,7 +1806,7 @@ mod transform_anchor { #[test] fn matching_anchors() { let none_ctx = Context::new("my_crate_none".into(), true, false); - let mut some_ctx = Context::new("my_crate_some".into(), true, false); + let mut some_ctx = Context::new("my_crate_some".into(), true, false); some_ctx.curr_type_block = Some("Type".into()); some_ctx.end_type_block = "}".into(); @@ -1998,7 +2000,7 @@ mod transform_line { #[test] fn matching_lines_anchor() { let mut none_ctx = Context::new("my_crate_none".into(), true, false); - let mut some_ctx = Context::new("my_crate_some".into(), true, false); + let mut some_ctx = Context::new("my_crate_some".into(), true, false); some_ctx.curr_type_block = Some("Type".into()); some_ctx.end_type_block = "}".into();