Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment lines without Doxygen tags is not parsed correctly #5741

Closed
michelleangela opened this issue Jul 7, 2020 · 8 comments
Closed

Comment lines without Doxygen tags is not parsed correctly #5741

michelleangela opened this issue Jul 7, 2020 · 8 comments
Labels
Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. fixed Check the Milestone for the release in which the fix is or will be available. Language Service Visual Studio Inherited from Visual Studio

Comments

@michelleangela
Copy link
Contributor

michelleangela commented Jul 7, 2020

This is reported on Visual Studio at
https://developercommunity.visualstudio.com/content/problem/1105383/comments-without-doxygen-tags-is-not-parsed-correc.html. Please upvote the Visual Studio feedback ticket to increase priority of issue as this feature is a shared API between Visual Studio C++ IntelliSense and the VS Code C++ extension.

Sample code:

/**
 * Hello there
 * blue sky.
 *
 * @return this is return note
 */
int test()
{
    return 0;
}

Repro steps:

  • In a C++ source, use the sample code provided.
  • Hover over the function test().
  • Tooltip display result: “Hello thereblue sky”
    image

Expected result in tooltip display:
“Hello there blue sky”

Note:
This issue only occurs when the comment has Doxygen tags.

@michelleangela michelleangela added Visual Studio Inherited from Visual Studio Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. labels Jul 7, 2020
@michelleangela michelleangela added this to the Tracking milestone Jul 7, 2020
@michelleangela michelleangela changed the title Comments without Doxygen tags is not parsed correctly Comment lines without Doxygen tags is not parsed correctly Dec 11, 2020
@cinderblock
Copy link

When "Doxygen tags" are not used, is it also expected that single newlines get replaced with <br />?

image

@michelleangela
Copy link
Contributor Author

@cinderblock
The space after the function name in the tooltip is not a replacement of single newlines from the comment, but the space is there to format the function name and comments with a space between them.

Here's an example with a one line comment
image

@cinderblock
Copy link

@michelleangela That's not what I'm referencing.

Do we not expect this to be displayed on one line?

/**
 * one
 * line
 * or
 * not
 */

As in, do the HTML whitespace rules only apply when using @ or / tags?

@sean-mcmanus sean-mcmanus added the more votes needed Issues that have been postponed until more community members upvote it label Jul 3, 2021
@Delgan
Copy link

Delgan commented Sep 30, 2021

Hi!

Just another example: I'm often using \brief (or @brief, result is the same) then add a detailed description below (see Doxygen manual).

However, as soon as the \brief command is added, the newlines are removed from the tooltip which makes the documentation much less pleasant to read.

Peek 2021-09-30 16-25

Without the \brief command Doxygen won't generate function summary in HTML.
Sadly, that means we can't have the best of both worlds.

@pclay614
Copy link

pclay614 commented Oct 8, 2021

Yes, it's incredibly frustrating that the doxygen parsing doesn't respect newlines and bulleted lists.

@michelleangela michelleangela added fixed Check the Milestone for the release in which the fix is or will be available. and removed more votes needed Issues that have been postponed until more community members upvote it labels Nov 9, 2021
@sean-mcmanus
Copy link
Contributor

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.8.0-insiders (the missing newline becomes a space).

@austintraver
Copy link

@sean-mcmanus : Confirmed 👏🏻 upgrading from 1.7.1 to the 1.8.0 insiders build fixed this issue for me.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2022
@sean-mcmanus
Copy link
Contributor

Did/can anyone file a feature request on VS to turn the space into a newline? They resolved the reported "bug" as "not a bug": https://developercommunity.visualstudio.com/t/Tooltips-are-not-showing-doxygen-comment/10087897

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. fixed Check the Milestone for the release in which the fix is or will be available. Language Service Visual Studio Inherited from Visual Studio
Projects
None yet
Development

No branches or pull requests

7 participants