• Login
Community
  • Login

New version of HTML Tag

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
html plugins
39 Posts 6 Posters 14.5k 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.
  • R
    rdipardo
    last edited by Feb 5, 2022, 11:16 PM

    Martijn Coppoolse has generously donated the source code of the HTML Tag plugin.

    Version 1.2 will be patched against the major breaking change introduced in 8.3. It also fixes a bug in decoding JavaScript Unicode characters (as was reported on the forum).

    More on this topic:

    • https://sourceforge.net/p/npp-plugins/discussion/725650/thread/08c8e87447
    • https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11104#issuecomment-1028188095
    • https://github.com/notepad-plus-plus/nppPluginList/pull/411

    Downloads: https://bitbucket.org/rdipardo/htmltag/downloads
    Release notes: https://bitbucket.org/rdipardo/htmltag/src/default/NEWS.textile
    Bugs: https://bitbucket.org/rdipardo/htmltag/issues, or start a forum thread under Plugin Development

    Y 1 Reply Last reply Feb 6, 2022, 12:18 AM Reply Quote 9
    • Y
      Yaron @rdipardo
      last edited by Yaron Feb 6, 2022, 12:21 AM Feb 6, 2022, 12:18 AM

      @rdipardo,

      Thank you very much for taking and continuing the “HTML Tag” project.

      Congratulations! Great work.

      Best regards.

      1 Reply Last reply Reply Quote 3
      • R
        rdipardo
        last edited by Mar 1, 2022, 4:55 AM

        Note Since v1.2, all 64-bit versions of HTML Tag require Notepad++ 8.3 or newer.


        HTML Tag 1.2.1 is available for download.

        This is primarily a maintenance release to address the risk of crashing N++ versions older than 8.3 — overlooked in the rush to get 1.2 out the door. It also clears the ground ahead of a planned transition to Free Pascal (most likely in time for the next minor release). More than 1,200 SLOC were removed; compiled binaries are ~20% smaller.

        Users may notice that the JavaScript (de/en)coding functions have new key mappings, and new shortcuts were added for the less common HTML entity (de/en)coding functions. Decoding multi-line Unicode character sequences has also been improved.

        Y 1 Reply Last reply Mar 1, 2022, 11:28 AM Reply Quote 7
        • Y
          Yaron @rdipardo
          last edited by Mar 1, 2022, 11:28 AM

          @rdipardo,

          Thank you for your work. I appreciate it.

          1 Reply Last reply Reply Quote 1
          • R rdipardo referenced this topic on Mar 10, 2022, 12:31 PM
          • R
            rdipardo
            last edited by Apr 1, 2022, 3:06 AM

            Note Since v1.2, 64-bit versions of HTML Tag require Notepad++ 8.3 or newer.


            Version 1.2.2 patches the first issue to appear on the new tracker.

            It was noted that encoding entities would make them decompose if the system used a single-byte code page like Windows-1252:

            Htmltag121-win-7-x86

            I would’ve never noticed without the bug report since I activated the “beta” feature of system-wide Unicode on my PC. Users without this option can now expect (de/en)coding to be more faithful and non-destructive (*):

            Htmltag122-win-11-x86-64


            (*) With the ongoing exception of 4-byte glyphs like 🍪, of course ;)

            R 1 Reply Last reply Apr 1, 2022, 3:13 AM Reply Quote 3
            • R
              rdipardo @rdipardo
              last edited by Apr 1, 2022, 3:13 AM

              Edit found a better host for the GIFs


              HTML Tag v1.2.1

              htmltag121_win_7_x86_002.gif

              HTML Tag v1.2.2

              v122_patched.gif

              Y 1 Reply Last reply Apr 13, 2022, 12:38 PM Reply Quote 2
              • Y
                Yaron @rdipardo
                last edited by Apr 13, 2022, 12:38 PM

                @rdipardo,

                I’ve built NPP 8.4 (not officially released yet), and on startup I get the following message:

                3e443b17-82c6-4f21-b0c3-7ec2f1398158-תמונה.png

                Could you please have a look?

                Thank you.

                R 1 Reply Last reply Apr 13, 2022, 7:32 PM Reply Quote 1
                • R
                  rdipardo @Yaron
                  last edited by Apr 13, 2022, 7:32 PM

                  @yaron said in New version of HTML Tag:

                  @rdipardo,

                  I’ve built NPP 8.4 (not officially released yet), and on startup I get the following message

                  It means this condition tested false:

                      (HIWORD(NppVersion) > 8) or
                      ((HIWORD(NppVersion) = 8) and
                        // 8.3 -> 8,3 (*not* 8,30)
                        ((LOWORD(NppVersion) = 3) or
                         ((LOWORD(NppVersion) > 21) and not IsPatchRelease)))
                  

                  Version 8.4 would be parsed as HIWORD -> 8, LOWORD -> 4, which fails at the LOWORD(NppVersion) > 21 branch.
                  The above comment about 8.3 is my own, so I really should have seen this coming . . .

                  Maybe @donho can pad the minor version so it works out to 40 instead? I don’t know how many plugins depend on the current system, but a more rational approach the version numbers would probably benefit everybody.

                  Worst case, I’ll have to push a patched release.

                  Thanks for testing!

                  Y 2 Replies Last reply Apr 13, 2022, 7:51 PM Reply Quote 2
                  • Y
                    Yaron @rdipardo
                    last edited by Apr 13, 2022, 7:51 PM

                    @rdipardo,

                    Thank you for the explanation.

                    so I really should have seen this coming

                    We’re merely humans. :)

                    My 8.4 version is the main build I’m using now, and I had to remove HTML Tag.
                    Even if your suggestion is accepted, it would probably take a while.

                    Would you mind pushing a patched release?
                    I’d appreciate it.

                    1 Reply Last reply Reply Quote 0
                    • Y
                      Yaron @rdipardo
                      last edited by Apr 13, 2022, 8:01 PM

                      @rdipardo,

                      Obviously I can change the version in my build.
                      But anyway, the official 8.4 is supposed to be released soon.

                      R 2 Replies Last reply Apr 13, 2022, 9:39 PM Reply Quote 0
                      • R
                        rdipardo @Yaron
                        last edited by Apr 13, 2022, 9:39 PM

                        It’s pretty kludgy, but this will tide us over until we’re safely into a v9 series.

                        program CheckNppVersions;
                        
                        {$IFDEF FPC}
                        {$mode objfpc}{H+}
                        {$ENDiF}
                        
                        uses
                          Windows, Classes, SysUtils;
                        
                        type
                          NppVersion = record
                            Major: Word;
                            Minor: Word;
                          end;
                        
                        const
                            MinorVersions: array[0..20] of Word = (0, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 191, 192, 193, 2, 21, 3, 31, 32, 33, 4);
                            PatchReleases: Array[0..2] of Word = ( 191, 192, 193 );
                        var
                          V : NppVersion;
                          i, j: byte;
                          IsCompat: Boolean;
                          IsPatchRelease: Boolean;
                        begin
                          v.Major := 8;
                          IsCompat := False;
                          try
                            WriteLn('Major'#9'Minor'#9'Compatible?');
                            WriteLn('-----'#9'-----'#9'------------');
                        
                            for i := 0 to Length(MinorVersions) - 1 do
                            begin
                              v.Minor := MinorVersions[i];
                              IsPatchRelease := False;
                        
                              for j := 0 to Length(PatchReleases) - 1 do
                              begin
                                IsPatchRelease := (V.Minor = PatchReleases[j]);
                                if IsPatchRelease then Break;
                              end;
                        
                              IsCompat :=
                                  (v.Major > 8) or
                                  ((v.Major = 8) and
                                    (((V.Minor >= 3) and (V.Minor <= 9)) or
                                     ((V.Minor > 21) and not IsPatchRelease)));
                        
                              WriteLn(Format('%5d'#9'%5d'#9'%12s', [V.Major, V.Minor, IsCompat.ToString(TUseBoolStrs.true)]));
                            end;
                          finally
                          end;
                        end.
                        
                        > dcc.bat CheckNppVersions.pas
                        Embarcadero Delphi for Win64 compiler version 33.0
                        Copyright (c) 1983,2018 Embarcadero Technologies, Inc.
                        CheckNppVersions.pas(34) Hint: H2077 Value assigned to 'IsPatchRelease' never used
                        56 lines, 1.53 seconds, 1432880 bytes code, 195448 bytes data.
                        
                        > CheckNppVersions.exe
                        Major   Minor   Compatible?
                        -----   -----   ------------
                            8       0          False
                            8       1          False
                            8      11          False
                            8      12          False
                            8      13          False
                            8      14          False
                            8      15          False
                            8      16          False
                            8      17          False
                            8      18          False
                            8      19          False
                            8     191          False
                            8     192          False
                            8     193          False
                            8       2          False
                            8      21          False
                            8       3           True
                            8      31           True
                            8      32           True
                            8      33           True
                            8       4           True
                        
                        Y 1 Reply Last reply Apr 13, 2022, 10:05 PM Reply Quote 1
                        • Y
                          Yaron @rdipardo
                          last edited by Apr 13, 2022, 10:05 PM

                          @rdipardo,

                          Great.
                          Thank you for your time and work.

                          R 1 Reply Last reply Apr 14, 2022, 6:25 PM Reply Quote 0
                          • R
                            rdipardo @Yaron
                            last edited by Apr 14, 2022, 12:12 AM

                            @yaron,

                            But anyway, the official 8.4 is supposed to be released soon.

                            I’m obviously not up to speed, but the current git still has “8.33”. Where can I open a PR showing how to bump the version without breaking the plugin (i.e., by adding a 0 to the end of the VERSION_VALUE string) ?

                            diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h
                            index a6a402c2..ed26d0f0 100644
                            --- a/PowerEditor/src/resource.h
                            +++ b/PowerEditor/src/resource.h
                            @@ -23,8 +23,8 @@
                             
                             // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
                             // ex : #define VERSION_VALUE TEXT("5.63\0")
                            -#define VERSION_VALUE TEXT("8.33\0")
                            -#define VERSION_DIGITALVALUE 8, 3, 3, 0
                            +#define VERSION_VALUE TEXT("8.40\0")
                            +#define VERSION_DIGITALVALUE 8, 4, 0, 0
                             
                             // Notepad++ version: end
                             
                            
                            
                            Y 1 Reply Last reply Apr 14, 2022, 10:39 AM Reply Quote 0
                            • Y
                              Yaron @rdipardo
                              last edited by Apr 14, 2022, 10:39 AM

                              @rdipardo said in New version of HTML Tag:

                              Where can I open a PR showing how to bump the version without breaking the plugin?

                              I’m not sure I understand your question.
                              Why not in https://github.com/notepad-plus-plus/notepad-plus-plus/pulls?

                              Thanks again.

                              R 1 Reply Last reply Apr 14, 2022, 5:58 PM Reply Quote 0
                              • R
                                rdipardo @Yaron
                                last edited by Apr 14, 2022, 5:58 PM

                                I’m not sure I understand your question.

                                It was more of a rhetorical outburst in the heat of the moment. I tried to make the case in a bug report instead.

                                The secret to my productivity? I’m still “Stand[ing] with Hong Kong” . . .

                                Nppv7.9.2x86.png

                                1 Reply Last reply Reply Quote 1
                                • R
                                  rdipardo @Yaron
                                  last edited by Apr 14, 2022, 6:25 PM

                                  @yaron,
                                  New release ready to try: bitbucket.org/rdipardo/htmltag/issues/2.
                                  Let’s hope it makes it into v1.4.9 of Plugins Admin (and N++ 8.4_).

                                  חג פסח שמח!

                                  Y 1 Reply Last reply Apr 14, 2022, 6:35 PM Reply Quote 2
                                  • Y
                                    Yaron @rdipardo
                                    last edited by Apr 14, 2022, 6:35 PM

                                    @rdipardo,

                                    Thank you very much. I appreciate it.

                                    Should I reply “חג שמח גם לך”? :)
                                    Anyway, thanks for that too.

                                    1 Reply Last reply Reply Quote 1
                                    • R rdipardo referenced this topic on May 13, 2022, 1:02 AM
                                    • arel3A arel3 referenced this topic on May 14, 2022, 4:29 PM
                                    • arel3A
                                      arel3
                                      last edited by May 14, 2022, 4:42 PM

                                      Please update the 'readme.textfile`. It does not include activating the plugin through the Plugins Admin menu. I figured that out but not everyone is guaranteed to know that step is required.

                                      After copying the .dll to the plugins folder:

                                      1. Open the the Plugins menu and then open ‘Plugins Admin…’

                                      2. Searching for HTML if there’s a long list (as there is for me)

                                      3. Check the checkbox to the left of the plugin name in the list.

                                      4. Click the “Install” button in the upper left.
                                        notepad++ will restart and your plugin will then be activated and ready to be used.

                                      R 1 Reply Last reply May 15, 2022, 8:07 PM Reply Quote 0
                                      • R
                                        rdipardo @arel3
                                        last edited by May 15, 2022, 8:07 PM

                                        @arel3 said in New version of HTML Tag:

                                        Please update the 'readme.textfile` . . .

                                        Done.

                                        1 Reply Last reply Reply Quote 2
                                        • R
                                          rdipardo
                                          last edited by Jun 8, 2022, 2:24 AM

                                          Notes

                                          • Since v1.2, 64-bit versions of HTMLTag require Notepad++ 8.3 or newer.
                                          • Notepad++ 8.4 is not compatible with HTMLTag 1.2.1 or 1.2.2

                                          HTMLTag is now free (as in Free Pascal)

                                          1.3 will be the first version linked against Free Pascal’s open source runtime libraries.

                                          The transition from Delphi’s proprietary runtime took longer than expected; I don’t recommend doing the same with other Object Pascal plugins, especially if they depend on Delphi’s Visual Component Library. That HTMLTag had no GUI was a lucky exception. Potential contributors will find that a command line and GDB are all that’s needed to get started.

                                          To mark the milestone, the About dialog has been refreshed with clickable URLs and dynamic text revealing the path to the HTML entities configuration file. A missing file will be indicated by a red error message; when found, clicking will open it (in notepad.exe, unless you’ve hacked the Registry to make N++ the system’s default text editor):

                                          htmltagv130_002.gif

                                          No more load failures in 64-bit Notepad++

                                          As confirmed here, all 64-bit versions of HTMLTag will load without fail in N++ 8.4.1 and later.

                                          Y 1 Reply Last reply Jun 10, 2022, 10:19 AM Reply Quote 6
                                          • First post
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors