Skip to content

Commit

Permalink
Update docs in README
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Nov 25, 2020
1 parent c5439e6 commit e73a39d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ targeted item and what's in scope (which means items like `String` which are in
the prelude are just a `[String]` away). Those links are clearer for both
the person writing them in the first place and subsequent readers reviewing them.
They are also easier to reason about since file hierachy does not affect them.
Below is the intra-doc links version of the examples above:

```rust
/// [`make_ascii_uppercase`]: u8::make_ascii_uppercase()
Expand Down Expand Up @@ -83,7 +84,11 @@ $ cargo intraconv path/to/my/file.rs -i intraconv.toml # Give a file containing
# links to ignore
```

It is possible to give multiple paths to files or directories.
It is possible to give multiple paths to files or directories. When searching
exact paths, `cargo-intraconv` will use the crate name given with `-c`. For
directories it will try to find the crate name in a `Cargo.toml`, falling back
to the default of `-c` if the name cannot be transformed to a valid Rust
identifier.

> Note: `intraconv` will accept any file, no just `.rs` ones: you can use it
> on markdown files that are included as docs in Rust files for example.
Expand Down Expand Up @@ -137,15 +142,11 @@ should be adressed in future versions of either the crate or Rust itself.

For issues about intra-doc links you should look-up [the issues at `rust-lang/rust`].

For issues about this crate, here are a few:
For issues about this crate, here is one:

- `#method.method_name` links will sometimes be transformed to point to the
wrong item. This is because `intraconv` uses regexes to find links and the
types related to them, which is not perfect.
- Crate names are not detected very well at the moment and if you don't use
`--crate` (`-c`) will sometime fail in strange ways. Be sure to check !
By default `cargo-intraconv` will use `my_krate` to avoid false `crate::`
replacements.

[the issues at `rust-lang/rust`]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AA-intra-doc-links+label%3AC-bug

Expand Down

0 comments on commit e73a39d

Please sign in to comment.