You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New lines are removed from docstrings if prefixed by "@brief" Doxygen style #10039
OS and version of remote machine (if applicable): Ubuntu 20.04 (dev container)
GDB / LLDB version: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
When a docstrings starts with @brief (which is a Doxygen convention), then newlines are ignored. This is not very convenient, because the @brief should appear on the first line and detailed description on following blocks.
I have realised its not just the @brief that's causing the problem... Instead, it is any type of Doxygen specific keyword (i.e. @param, @note, @return, @returns). Without any keywords, newlines are preserved.
An annoying workaround (setup process and only one new line) until this is pushed to release is to use the Detail (@detail) command to get a line break between the brief and description. Make sure to enable the details tag in Extensions -> C/C++ -> Code Documentation -> Section Tags (C_Cpp.doxygen.sectionTags)
Reacted by JP Hutchins, Steve, Georg Sperl and Paolo Flores
I believe this is fixed starting in 1.21.1 pre-release (soon to be published). We will interpret an empty line as a paragraph break.
/** * @brief Hello there * * Hello again*/voidfoo();
It's fixed! I'm crying. 🥲
/** * @brief Encode the response into a packet. * * Newlines work! If there's a blank line first! * @param response The response to encode. * @param [out] packet Pointer to the output packet. * @return Error code. */intapi_encode(structapi_responseconst*response, unionapi_packet*out_packet);
Activity
Delgan commentedon Oct 20, 2022
It seems it's a regression, it was already fixed with:
sean-mcmanus commentedon Oct 21, 2022
It's not a regression -- the fix was to turn the newline into a space.
sean-mcmanus commentedon Oct 21, 2022
This was opened on VS at https://developercommunity.visualstudio.com/t/Tooltips-are-not-showing-doxygen-comment/10087897 . They closed it as "not a bug". You could try filing a feature request.
Delgan commentedon Oct 21, 2022
Sean McManus (@sean-mcmanus) Indeed, sorry for calling this a regression. I thought it worked some times ago, I must have been dreaming.
Following your advice, I opened a "feature request" ticket here: Avoid converting newlines into spaces in Doxygen "brief" comments (#10178887). 👍
dimsanius commentedon Dec 12, 2022
I have realised its not just the
@briefthat's causing the problem... Instead, it is any type of Doxygen specific keyword (i.e.@param,@note,@return,@returns). Without any keywords, newlines are preserved.Example with no Doxygen keywords:

Example with Doxygen keyword used:

starball5 commentedon Jun 14, 2023
Related on Stack Overflow: Line breaks are not preserved following @brief and similar Doxygen keywords in the VS Code hover info with the Cpptools extension.
JPHutchins commentedon Jul 30, 2023
Make sure to upvote here: https://developercommunity.visualstudio.com/t/Avoid-converting-newlines-into-spaces-in/10178887
IMO it's a bug.
bastian2001 commentedon Apr 12, 2024
An annoying workaround (setup process and only one new line) until this is pushed to release is to use the Detail (@detail) command to get a line break between the brief and description. Make sure to enable the details tag in Extensions -> C/C++ -> Code Documentation -> Section Tags (
C_Cpp.doxygen.sectionTags)ba7lya commentedon Jul 5, 2024
This problem still exist.
emrekz commentedon Jul 14, 2024
An another workaround which may helps but has not regular font style.

bobbrow commentedon Jul 15, 2024
I believe this is fixed starting in 1.21.1 pre-release (soon to be published). We will interpret an empty line as a paragraph break.
JPHutchins commentedon Aug 2, 2024
It's fixed! I'm crying. 🥲
bobbrow commentedon Aug 2, 2024
JP Hutchins (@JPHutchins) from your screenshot it looks like you could benefit from #5773 as well. Did you add your 👍 to it yet?
Delgan commentedon Oct 1, 2024
Bob Brown (@bobbrow) This is great, I can confirm that it works very well, thanks!
I made some tests and discovered, however, that it breaks the rendering of code blocks (v1.21.6):
Should I open a new issue?
bobbrow commentedon Oct 1, 2024
Delgan, I can open it for you. Thanks for reporting it. This issue was supposed to have been closed with the release of 1.21.