Skip to content

C_Cpp.commentContinuationPatterns only recognized for follow-up line #8998

@sreischl

Description

@sreischl

Bug type: C_Cpp.commentContinuationPatterns

Describe the bug

  • OS and Version: Windows 10 (20H2, Build 19042.1526)
  • VS Code Version: 1.65.0
  • C/C++ Extension Version: v1.8.4

Self introduced comment continuation pattern is recognized. But only for one follow-up line.

E.g.:

    "C_Cpp.commentContinuationPatterns": [
      "/**",
      "/*!",
      "//'"
    ]

Starting with this sequence, it works as expected...:

/*!<enter>
 * 

But continuing with:

/*!<enter>
 * asdf<enter>
 

The asterisk is getting lost.

This behavior does not occur with the standard pattern of '/**'.

Steps to reproduce

  1. introduce a custom pattern in settings.json
  2. use the multi-line comment as described above

Expected behavior
The asterisk should arise in the second follow-up line, too. Just as the default pattern does.

Code sample and logs

/**
 * \internal
 * <- this example works perfectly
 * 
 */
void bar(void)
{

}

/*!
 * asdf
 <- typing <enter> after the 'asdf' above leaves us out missing the asterisk

void foo(void)
{

}

Screenshots

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.help wantedCan be fixed in the public (open source) repo.verifiedBug has been reproduced

    Type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions