carbon-app / carbon

:black_heart: Create and share beautiful images of your source code
https://carbon.now.sh
MIT License
34.5k stars 1.91k forks source link

Triple slash comments are not properly highlighted in Solidity #1434

Open PaulRBerg opened 1 year ago

PaulRBerg commented 1 year ago

Describe the bug

Triple slash (///) comments are not properly highlighted in Solidity

To Reproduce Steps to reproduce the behavior:

  1. Go to carbon.now.sh
  2. Click on "Solidity" from the language dropdown
  3. Paste any Solidity code snippet that contains triple slashes

Expected behavior

The triple slash (///) comments should be highlighted just like the double slash (//) comments, but they aren't.

Screenshots

Screenshot 2022-11-29 at 6 53 19 PM

Code Snippet

Toggle me ```solidity pragma solidity >=0.8.13; import "@prb/math/UD60x18.sol"; contract PRBMathV3 { /// @dev Compiler throws error "Operator * not compatible with types UD60x18 and uint256". // @dev Compiler throws error "Operator * not compatible with types UD60x18 and uint256". function multiplyByTimestamp(UD60x18 x) external pure returns (UD60x18 result) { result = x * block.timestamp; } } ```