foundry
foundry copied to clipboard
bug(doc): respect number of end lines in original NatSpec
Component
Forge
Describe the feature you would like
forge doc
does not respect the number of end lines in the original NatSpec comments. It would beg good if it did this since Markdown paragraphs are better delineated this way. For example, Prettier auto-formats one end line to an empty space.
Take this example:
/// @notice Transfers the admin of the contract to a new address.
///
/// Notes:
/// - Does not revert if the admin is the same.
/// - This function can potentially leave the contract without an admin, thereby removing any
/// functionality that is only available to the admin.
///
/// Requirements:
/// - The caller must be the current contract admin.
///
/// @param newAdmin The address of the new admin.
function transferAdmin(address newAdmin) external;
The Markdown generated by forge doc
is the following:
### transferAdmin
Transfers the admin of the contract to a new address.
Notes:
- Does not revert if the admin is the same.
- This function can potentially leave the contract without an admin, thereby removing any
functionality that is only available to the admin.
Requirements:
- The caller must be the current contract admin.
I would like forge doc
to keep two end lines between "to a new address." and "Notes:".
Additional context
No response