Open
Description
Component
Forge
Describe the feature you would like
Issue
forge doc
adds an asterisk * to the Markdown paragraphs generated for the @dev
NatSpec tag.
This is not great because it screws up the formatting for anything more complicated than a line, e.g.:
/// @notice Creates a stream with the provided start time and end time as the range of the stream. The stream is
/// funded by `msg.sender` and is wrapped in an ERC-721 NFT.
///
/// @dev Emits a {CreateLockupLinearStream} and a {Transfer} event.
///
/// Notes:
/// - As long as they are ordered, it is not an error to set a range that is in the past.
///
/// Requirements:
/// - `params.recipient` must not be the zero address.
/// - `params.totalAmount` must not be zero.
/// - `params.range.start` must not be greater than `params.range.cliff`.
/// - `params.range.cliff` must not be greater than `params.range.end`.
/// - `msg.sender` must have allowed this contract to spend at least `params.totalAmount` assets.
/// - If set, `params.broker.fee` must not be greater than `MAX_FEE`.
///
/// @param params Struct that encapsulates the function parameters.
/// @return streamId The id of the newly created stream.
function createWithRange(LockupLinear.CreateWithRange calldata params) external returns (uint256 streamId);
forge doc
generates the following Markdown for the function above:
### createWithRange
Creates a stream with the provided start time and end time as the range of the stream. The stream is
funded by `msg.sender` and is wrapped in an ERC-721 NFT.
*Emits a {CreateLockupLinearStream} and a {Transfer} event.
Notes:
- As long as they are ordered, it is not an error to set a range that is in the past.
Requirements:
- `params.recipient` must not be the zero address.
- `params.totalAmount` must not be zero.
- `params.range.start` must not be greater than `params.range.cliff`.
- `params.range.cliff` must not be greater than `params.range.end`.
- `msg.sender` must have allowed this contract to spend at least `params.totalAmount` assets.
- If set, `params.broker.fee` must not be greater than `MAX_FEE`.*
It adds that extra *
, which (i) doesn't work in this case because this is a paragraph with a list, and (ii) even for cases where it works (single lines), it looks ugly, IMO.
Solutions
- Completely remove this asterisk.
- Let users choose whether they want the asterisk via a config option under
[doc]
.
Additional context
No response
Metadata
Metadata
Assignees
Type
Projects
Status
Todo