Natspec: text before the @notice tag gets included as part of it
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
```
contract C {
/// Before the notice.
/// @notice Some function.
function f() public view returns (uint ret) {
}
}
```
results in
```
Developer Documentation
{
"kind": "dev",
"methods": {},
"version": 1
}
User Documentation
{
"kind": "user",
"methods":
{
"f()":
{
"notice": "Before the notice.Some function."
}
},
"version": 1
}
```
Contributor guide
Research direction
Reproduce the shown NatSpec example and inspect the parser entry point that handles text before @notice. Confirm the current output, then make the notice contain only the text following the tag and verify that the preceding sentence is excluded from the generated user documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100