• Login
Community
  • Login

PHP syntax not highliting when inside other language string (ver 7.7)

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 7 Posters 1.7k 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.
  • A
    Asayhem
    last edited by Jun 6, 2019, 1:26 PM

    Php code that is written inside other laguage string is not highlighting in the latest version.
    Javascript example:
    var ScannerName = “<?php echo $_SERVER[‘REMOTE_ADDR’].”[WDT2]“; ?>”;
    The line is interpreted as string (gray color) but php syntax should override the styling and use php coloring in between the <?php ?> tags.

    NP++ ver 7.6.2 works correctly

    1 Reply Last reply Reply Quote 0
    • P
      PeterJones
      last edited by PeterJones Jun 6, 2019, 3:42 PM Jun 6, 2019, 3:41 PM

      You’re seeing it with PHP, not ASP, but you’ll find a few recent complaints about ASP having the same difficuly; it might be the same bug (though I’m not sure / cannot prove it):

      • https://notepad-plus-plus.org/community/topic/17764/defined-asp-style-disappeared-after-7-7-install
      • https://notepad-plus-plus.org/community/topic/17727/update-to-7-7-ver-and-missed-asp-code-style
      • https://notepad-plus-plus.org/community/topic/17696/bug-problem-with-syntax-highlighting-not-working-on-asp-classic-scripts/5
      1 Reply Last reply Reply Quote 1
      • A
        Asayhem
        last edited by Jun 7, 2019, 5:35 PM

        Yes I thought the issue is similar.
        Just wanted to report that php syntax has issues as well in case it is gonna get fixed soon.

        M 1 Reply Last reply Jun 9, 2019, 6:15 PM Reply Quote 0
        • K
          kkmuffme
          last edited by Jun 9, 2019, 11:18 AM

          Also having this issue, hope it gets fixed soon bc it’s super annoying.

          1 Reply Last reply Reply Quote 0
          • M
            Meta Chuh moderator @Asayhem
            last edited by Jun 9, 2019, 6:15 PM

            @Asayhem @kkmuffme

            this purely depends on the scintilla editor component, which is an external project.
            this behaviour is the same in previous notepad++ versions like 7.6.2, unless you had 3rd party highlighting plugins, and/or scripts installed, that could eventually do so.

            you could try to file a feature request at the scintilla tracker, but as php code strings like var ScannerName = "<?php echo $_SERVER['REMOTE_ADDR']."[WDT2]"; ?>"; are interpreted as text as expected, due to being in between two " double quotes, i doubt that it would be accepted.

            note: you can always download the latest SciTE scintilla demo editor, to see any scintilla feature changes.

            many thanks and best regards.

            D 1 Reply Last reply Jun 26, 2019, 2:51 PM Reply Quote 3
            • D
              David WZ @Meta Chuh
              last edited by Jun 26, 2019, 2:51 PM

              @Meta-Chuh
              I tried various Scite editor versions (dl from https://www.npackd.org/p/scite) and for the php language and your example, nothing changed since at least v4.0.0
              But I agree something has changed in Notepad++, previously the content in the php tags was highlighted.
              I will download previous versions of notepad++ to compare to v7.7.1…

              A 1 Reply Last reply Jun 26, 2019, 3:08 PM Reply Quote 0
              • A
                Alan Kilborn @David WZ
                last edited by Alan Kilborn Jun 26, 2019, 3:10 PM Jun 26, 2019, 3:08 PM

                @David-WZ said:

                I tried various Scite editor versions (dl from https://www.npackd.org/p/scite)

                Why would you obtain SciTe from anywhere but its home site? I don’t know for sure, but often this kind of thing is just asking for trouble…

                Haha, just noticed that @Meta-Chuh pointed to the same site…and yet you still went out of your way to get some “questionable” version.

                1 Reply Last reply Reply Quote 2
                • D
                  David WZ
                  last edited by David WZ Jun 26, 2019, 3:19 PM Jun 26, 2019, 3:18 PM

                  My bad, I didn’t go far enough in the past !
                  I’ve just seen that notepad++ v7.7 “Upgrade Scintilla from v3.56 to v4.14.”, so I tried v3.5 of Scite and the behaviour has changed…
                  @Meta-Chuh has right and the “problem” comes from Scintilla.
                  By the way, I think I will downgrade to Notepad++ v7.6.6, that will solve my problem for a while…

                  E 1 Reply Last reply Jun 26, 2019, 4:08 PM Reply Quote 3
                  • E
                    Ekopalypse @David WZ
                    last edited by Jun 26, 2019, 4:08 PM

                    @David-WZ

                    I assume it is related to the already reported issue.

                    D 1 Reply Last reply Jun 27, 2019, 7:18 AM Reply Quote 2
                    • D
                      David WZ @Ekopalypse
                      last edited by Jun 27, 2019, 7:18 AM

                      @Ekopalypse Yes it is, I didn’t see it.

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