solidity-docgen icon indicating copy to clipboard operation
solidity-docgen copied to clipboard

Incorrect underscore when using blank lines

Open 0xneves opened this issue 2 years ago • 0 comments

When using empty lines in the NatSpec like the following:

    /**
     * @dev Displayed when the amount of {ISwap-Asset} has a length of zero.
     *
     * NOTE: The `biding` or `asking` array must not be empty to avoid mistakes
     * when creating a swap. Assuming one side of the swap is empty, the
     * correct approach should be the usage of {transferFrom} and we reinforce
     * this behavior by requiring the length of the array to be bigger than zero.
     */
    error InvalidAssetsLength();

The generation will try to embrace all content in underscore (_) like so:

   ``solidity
   error InvalidAssetsLength()
   ``

   \_Displayed when the amount of {ISwap-Asset} has a length of zero.

   NOTE: The `biding` or `asking` array must not be empty to avoid mistakes
   when creating a swap. Assuming one side of the swap is empty, the
   correct approach should be the usage of {transferFrom} and we reinforce
   this behavior by requiring the length of the array to be bigger than zero.\_

But the .md will consider it invalid when generating the output, not processing the underscore correctly, resulting in: image

0xneves avatar Dec 15 '23 05:12 0xneves