Skip to content

Comment lines without Doxygen tags is not parsed correctly #5741

Closed

Description

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.

Activity

  1. changed the title [-]Comments without Doxygen tags is not parsed correctly[/-] [+]Comment lines without Doxygen tags is not parsed correctly[/+] on Dec 11, 2020
  2. cinderblock commented on Apr 3, 2021

    @cinderblock

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

    image

  3. michelleangela commented on Apr 7, 2021

    @michelleangela
    ContributorAuthor

    Cameron Tacklind (@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

  4. cinderblock commented on Apr 7, 2021

    @cinderblock

    Michelle Matias (@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?

  5. Delgan commented on Sep 30, 2021

    @Delgan

    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.

  6. pclay614 commented on Oct 8, 2021

    @pclay614

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

  7. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    and removed
    more votes neededIssues that have been postponed until more community members upvote it
    on Nov 9, 2021
  8. sean-mcmanus commented on Nov 30, 2021

    @sean-mcmanus
    Contributor

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

  9. austintraver commented on Jan 30, 2022

    @austintraver

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

  10. locked and limited conversation to collaborators on Mar 19, 2022
  11. sean-mcmanus commented on Oct 21, 2022

    @sean-mcmanus
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Doc commentsAn issue related to code comments shown in hover, completion, and signature help.Language ServiceVisual StudioInherited from Visual StudiofixedCheck the Milestone for the release in which the fix is or will be available.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions