primitive-dodoc icon indicating copy to clipboard operation
primitive-dodoc copied to clipboard

Handle Solidity NatSpec whitespace

Open fulldecent opened this issue 3 years ago • 2 comments

For a function specification like this:

/// @notice Perform initial contract setup
/// @dev    The initializer modifier ensures this is only called once, the owner should confirm this was properly
///         performed before publishing this contract address.
/// @param  _initialFee          fee to be paid on each sale, in basis points
/// @param  _initialFeeRecipient wallet to collets fees
/// @param  _initialPaymentToken address of the token that is used for settlement

I am hoping it can be parsed as:

Notice:

Perform initial contract setup

Dev:

The initializer modifier ensures this is only called once, the owner should confirm this was properly performed before publishing this contract address.

Param _initialFee:

fee to be paid on each sale, in basis points

Param _initialFeeRecipient :

wallet to collets fees

Param _initialPaymentToken :

address of the token that is used for settlement


Please let me know how this works and how I can help.

I am also the maintainer of the Solidity Style Guide and the Solidity NatSpec specification.

fulldecent avatar Mar 09 '22 20:03 fulldecent

Just to be sure to understand the issue here: you are talking about extra spaces that are not managed correctly? If that's so, would trimming the extra spaces work?

clemlak avatar Mar 10 '22 08:03 clemlak

Trimming whitespaces before and after each line and then combining lines with one space would fix it.

fulldecent avatar Mar 10 '22 14:03 fulldecent