You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
//! eiusmod tempor incididunt ut labore et dolore magna aliqua.
//!
//! # Cargo Features
//!
#![doc = document_features::document_features!()]
The last part creates Markdown from ##-prefixed comments in the [features] section of Cargo.toml. I.e. it makes it easy to keep comments in Cargo.toml and docs in sync.
However, it can be mixed with additional (feature) docs and so the header, # Cargo Features, is not coming from document-features) but must be added manually. It then ends up at the bottom of the cargo-rdme-generated README.md, w/o anything under it.
It would be great if this feature-generation stuff could somehow be included/supported in cargo-rdme.
Alternatively a cargo-rdme option that removes the last header if it doesn't have text under it could be a workaround.
E.g. --strip-terminal-empty-header.
The text was updated successfully, but these errors were encountered:
The
document-features
crate achieves a similar result ascargo-rdme
.A typical
lib.rs
doc block using this looks like:The last part creates Markdown from
##
-prefixed comments in the[features]
section ofCargo.toml
. I.e. it makes it easy to keep comments inCargo.toml
and docs in sync.However, it can be mixed with additional (feature) docs and so the header,
# Cargo Features
, is not coming fromdocument-features
) but must be added manually. It then ends up at the bottom of thecargo-rdme
-generatedREADME.md
, w/o anything under it.It would be great if this feature-generation stuff could somehow be included/supported in
cargo-rdme
.Alternatively a
cargo-rdme
option that removes the last header if it doesn't have text under it could be a workaround.E.g.
--strip-terminal-empty-header
.The text was updated successfully, but these errors were encountered: