Community
    • Login

    T-SQL highlighting problem: backslash is not an escape character here

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 332 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PeterAdamP
      PeterAdam
      last edited by

      The backslash at the end of the 9th line in the string breaks highlighting:
      d738221f-f4f8-4ebf-9b34-7ed1679ea67c-kép.png

      Removing the backslash the highlighting gets good, but the script turns to be wrong:

      7da9bb06-18ee-4516-9853-32187ab2f105-kép.png

      Can it be fixed? Should I try to edit the langs.xml file?

      Best regards,
      Peter

      Notepad++ v8.5.8 (64-bit)
      Build time : Oct 15 2023 - 21:43:56
      Path : C:\Program Files\Notepad++\notepad++.exe
      Command Line :
      Admin mode : OFF
      Local Conf mode : OFF
      Cloud Config : OFF
      OS Name : Windows 10 Pro (64-bit)
      OS Version : 22H2
      OS Build : 19045.3570
      Current ANSI codepage : 1250
      Plugins :
      AutoCodepage (1.2.6)
      FWDataViz (2.6.2)
      JsonTools (5.6)
      MarkdownViewerPlusPlus (0.8.2)
      mimeTools (2.9)
      NppConverter (4.5)
      nppcrypt (1.0.1.6)
      NppExport (0.4)
      RestApiToText (1.4.0.1)
      urlPlugin (1.2)
      XMLTools (3.1.1.13)
      _CustomizeToolbar (5.3)

      Alan KilbornA mpheathM 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @PeterAdam
        last edited by

        @PeterAdam

        08bb2c58-77d5-46e7-b4e5-4db39150fcce-image.png

        1 Reply Last reply Reply Quote 3
        • mpheathM
          mpheath @PeterAdam
          last edited by mpheath

          @PeterAdam

          The styling looks like the SQL lexer (for SQLite3,…) which is not the correct lexer for T-SQL. The @variables are not colored as they should. Problems with escapes…

          From the Language menu, select the Microsoft Transact-SQL lexer and you may see

          t-sql.png

          Should I try to edit the langs.xml file?

          The langs.xml file in %AppData%\Notepad++ may need updating if Microsoft Transact-SQL is not in the menu. Compare it with langs.model.xml that is in %ProgramFiles%\Notepad++ .

          1 Reply Last reply Reply Quote 3
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors