C# syntax highlighting issue with a verbatim string ending with a backslash (fixed)

C# syntax highlighting issue with a verbatim string ending with a backslash (fixed)

1

    Jan 15, 2018#1

    Hello all,

    I'm using UE 24.xx on Windows with the csharp.uew wordfile. I have a problem with a string containing a trailing backslash. When such a string is encountered, the remainder of the file gets interpreted for highlighting purposes as part of the string.

    Example:

    fileName = Path.Combine(@"..\logs\", fileName);

    The red formatted part is also highlighted as string although not belonging to the verbatim string.

    If I remove the last backslash then the highlighting is correct. I even tried changing to :

    fileName = Path.Combine(@"..\logs" + "\", fileName);

    with no effect.

    6,605548
    Grand MasterGrand Master
    6,605548

      Jan 15, 2018#2

      The second example is definitely coded wrong as the line should be:

      fileName = Path.Combine(@"..\logs" + "\\", fileName);

      But you are absolutely right about first line. The verbatim string highlighting is wrong with a backslash at end of the string. I verified that wrong highlighting with UE v24.20.0.51 and v22.20.0.49.

      The description of String Literal Prefix on Syntax Highlighting help page is correct and fits with the verbatim string literals definition in MSDN.

      So this issue is definitely a bug in syntax highlighting of UltraEdit. Please report it by email to IDM support to get it fixed in a future version of UltraEdit as I have done too.

        Oct 05, 2018#3

        This issue is fixed with UltraEdit for Windows v25.20.0.88 released on 2018-10-03.
        Best regards from an UC/UE/UES for Windows user from Austria