feature request: include doc comments in embed
It would be helpful if the doc comment for exported items could be optionally included with the code.
Yes I was actually thinking about this when I saw your previous issue. I'll see if I can work it in soon
Ideally, I would expand this to any attribute. #[doc = ".."] is then merely one specialized case for this.
So, we need a way to say:
- bring in all attributes (default behavior)
- don't bring in any attributes,
- bring in only these attributes
- bring in all attributes except these.
if we want to get that granular, might make sense to simply have an additional attribute #[docify::capture_attrs_start] and #[docify::capture_attrs_end] which will capture any attributes appearing between those two and also include them in the export. You could do multiple capture regions in the same item. that is the simplest API I can think of that can do all of the above
could also have a convenience #[docify::capture_attrs] that just gets all of them.
For all of the above, docify-related attributes would be ignored
Simplest use case is that atm
#[docify::export]
/// A mapping from `T::AccountId` to `Balance`.
#[pallet::storage]
pub type Balances<T: Config> = StorageMap<Key = T::AccountId, Value = Balance>;
is not capable of picking up the docs, and it would be good if it does. No strong opinion about the syntax.