Skip to content

Wrongly highlited comments in #include lines #1162

@Anteru

Description

@Anteru

(Original issue 1458 created by pyannis on 2018-07-19T10:32:26.407841+00:00)

The comments in a "#include ..." line are not highlighted correctly, as can be seen in the image below.

img1.png

Sample C++ code to show the problem:

#!C++
#include <iostream>
#include <stdlib.h>     // for the random numbers in main...
#include     <sys/types.h>  // for getpid()
#include /* inline comment 1 */ <unistd.h>     /* in_c_1   */   // for getpid()
#include                        <unistd.h>     /* in_c_2   */
#include /* inline com"ment 2 */ <unistd.h>                      // for getpid()
#include <stdio.h>     // for sp<r"intf()

// Next include lines for pygments test only...
#include "stdio.h"     // for spr"intf() /* not_inline  < > <" "" >>>
#include "<stdio.h">     // for spr"intf() /* not_inline  < > <" "" >>>
#include <"stdio.h>"     // for spr"intf() /* not_inline  < > <" "" >>>
#include stdio.h     // for spr"intf() /* not_inline  < > <" "" >>>
#include /* abc */ stdio.h     // for spr"intf() /* not_inline  < > <" "" >>>

using namespace std;    // an inline comment...

/*! \file matrix.cpp This is a class to manipulate 2D matrices.
    It also contain a main program to test its functionality.
 */

//! This is a class to manipulate 2D matrices.

/*! The Matrix objects are constructed providing their dimensions.<br>
    The matrix elements should be set via the #Mij method.<br>
    Various matrix operations are defined for the Matrix class.
 */

//------------------------------------------------------
class Matrix {
public:
  //! Constructor
  Matrix(int m, int n);

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-majorseverity: majorT-bugtype: a bugX-importedimported from Bitbucket

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions