Closed jost-s closed 1 year ago
Currently cargo-rdme
only supports intralinks of this format [⋯](crate::⋯)
, e.g. [operation](crate::holochain_integrity_types::Op)
(that is documented in the README). Please try that and let me know how it works. I'll create an issue to address this limitation.
I've seen that in the documentation, but didn't know how to apply it.
If I do [operation](crate::holochain_integrity_types::Op)
, it breaks the link in the generated Rust doc. Running cargo rdme
like this produces a different result indeed. However, it always strips the link from operation
, regardless of the flag being set or not.
Rustdoc does not recognized it because Op
is not defined in crate::holochain_integrity_types::Op
. cargo-rdme automatically strips intralinks that it does not know where they point to (and emits a warning).
The actual path is [operation](crate::prelude::holochain_integrity_types::Op)
and that should work with both rustdoc and cargo-rdme in strip intralinks mode (it won't be able to generate the intralink because it points to another crate, which is not supported currently).
Thank you for investigating this! I was not resolving the path correctly.
It works indeed now as expected and described. Stripping the links is preferred over invalid links, so I'll refactor all links and strip them for the time being.
I have multiple intra-doc links in a repo. To generate a readme, I execute
Expected
The intra-doc links are removed from the resulting readme.
Actual
Intra-doc links show up in the readme as is.
Repo used to produce the readme: https://github.com/holochain/holochain
The
lib.rs
intra-doc links are these for example:In the generated readme they appear like:
This happens both with and without the
--intralinks-strip-links
flag.