Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    7
    10
    1158
    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.
    • Asayhem
      Asayhem last edited by

      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
      • PeterJones
        PeterJones last edited by PeterJones

        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
        • Asayhem
          Asayhem last edited by

          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.

          Meta Chuh 1 Reply Last reply Reply Quote 0
          • kkmuffme
            kkmuffme last edited by

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

            1 Reply Last reply Reply Quote 0
            • Meta Chuh
              Meta Chuh @Asayhem last edited by

              @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.

              David WZ 1 Reply Last reply Reply Quote 3
              • David WZ
                David WZ @Meta Chuh last edited by

                @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…

                Alan Kilborn 1 Reply Last reply Reply Quote 0
                • Alan Kilborn
                  Alan Kilborn @David WZ last edited by Alan Kilborn

                  @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
                  • David WZ
                    David WZ last edited by David WZ

                    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…

                    Ekopalypse 1 Reply Last reply Reply Quote 3
                    • Ekopalypse
                      Ekopalypse @David WZ last edited by

                      @David-WZ

                      I assume it is related to the already reported issue.

                      David WZ 1 Reply Last reply Reply Quote 2
                      • David WZ
                        David WZ @Ekopalypse last edited by

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

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Copyright © 2014 NodeBB Forums | Contributors