Community
    • Login

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

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 739 Views 1 Watching
    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 Offline
      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 Offline
        Alan Kilborn @PeterAdam
        last edited by

        @PeterAdam

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

        1 Reply Last reply Reply Quote 3
        • mpheathM Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors