JavaScript block comment highlighting fails when opening /* starts right after closing in UE v24.20 and v25.00 (fixed)

JavaScript block comment highlighting fails when opening /* starts right after closing in UE v24.20 and v25.00 (fixed)

413
Basic UserBasic User
413

    Apr 21, 2018#1

    Hello.
    In JavaScript if you have something like this:

    Code: Select all

    /*
    1st block of comment
    *//*
    2nd block of comment
    */
    It shows only the first block as a comment, second block shows as code.

    Adding a space between */ and /* makes both block display properly as comments.

    Code: Select all

    /*
    1st block of comment
    */ /*
    2nd block of comment
    */
    Is that a bug?

    6,686585
    Grand MasterGrand Master
    6,686585

      Apr 21, 2018#2

      Yes, this issue is definitely a bug.

      The wrong highlighting of second block comment with first example block occurs only on using UltraEdit for Windows v24.20.0.27 to currently latest v25.00.0.68. It looks like those versions of UltraEdit detect */ as end of first block comment, next detect /* as start of second block comment, but highlight the second block comment as line comment because block comment highlighting ends with end of third line. Removing Line Comment = // from JavaScript wordfile or replacing // in wordfile by something different has no effect on wrong highlighting of second block comment starting immediately after end of first block comment. So *//* is not the reason for highlighting just first line of second block comment as comment.

      This wrong highlighting does not exist on using UltraEdit for Windows v24.10.0.35 or any previous version according to my tests with v24.10, v24.00, v23.20, v22.20. All UltraEdit versions < 24.20 highlight both block comments in both code examples correct as block comment.

      Please report this bug by email to IDM support.

      I reported this bug by email to IDM support with subject:

      Block comment not highlighted correct on starting immediately after end of previous block comment

      A user detected and reported in forum a wrong block comment highlighting if a block comment starts immediately after end of previous block comment.

      Here is an example:

      /* First block comment
         is ending on
         line 3. */
      /* Second
         block comment is not
         highlighted correct. */


      Copy those 5 lines into a new file and syntax highlight it with C#, C/C++, Java or JavaScript by selecting one of those highlighting languages in the status bar.

      It can been seen that on second block comment just the part up to end of third line is highlighted as comment like a line comment. The text on lines 4 and 5 are not highlighted as comment.

      Inserting a space character between */ and /* results in correct syntax highlighting of both block comments.

      This could be reproduced by me with UE v24.20.0.27 to v25.00.0.76.

      This syntax highlighting problem does not exist in any version of UE < v24.20 as I could find out by highlighting same five lines with latest version of 32-bit UE v24.10, v24.00, v23.20 and v22.20 on Windows 7 SP1 x64.

      This issue could be reproduced by IDM support and was added to issue tracking system as something to investigate and correct by the developers.

        Jul 04, 2018#3

        This syntax highlighting issue is fixed with UltraEdit for Windows v25.10.0.50 and UEStudio v18.10.
        Best regards from an UC/UE/UES for Windows user from Austria