Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag "main" is shown as error #922

Closed
igll opened this issue Feb 13, 2021 · 5 comments
Closed

Tag "main" is shown as error #922

igll opened this issue Feb 13, 2021 · 5 comments

Comments

@igll
Copy link

igll commented Feb 13, 2021

This html text gives an error.
The error dissapears when changing "main" into "div"

<!DOCTYPE html> 
<html>
<head> 
</head>
<body>
<div> 
<main>
</main> 
</div> 
</body>
</html>
@geoffmcl
Copy link
Contributor

@igll, sorry, do not understand the issue as presented...

On the sample code given, current tidy, version 5.7.45, does not issue any error... are you using some other version...

It does issue some warnings, but they are about trimming empty tags, which can be avoided with the option --drop-empty-elements no...

Look back to issue #82, PR #98, when <main> was added to tidy... and the sample in #916, which uses <main>... perhaps others...

So closing this until further clarified, explained... thanks...

@igll
Copy link
Author

igll commented Feb 19, 2021

Thanks for the explanation.
The problem arised using "updated Tidy2 0.2" (within updated Notepad++ v7.9.1).
From ignorance: Is there a possibility to upgrade its internal motor into tidy v5.7.45?

@geoffmcl
Copy link
Contributor

@igll wow, you are using a Tidy Notepad++ plugin...

More than TWO(2) years ago, I did fork a NppTidy2 repo, from bruderstein, and built a Tidy2.dll for Notepad++...

Of course, you also need to clone, build and install this tidy-html5 repo first...

I just cloned my fork again, in a new machine, DELL05, Windows 10, 64-bit, MSVC 16 2019, and it still builds fine... using the latest tidy 5.7.45...

And as per the Issue 9 have never published my fork back to Notepad++, so it gets added to the list of available plugins...

But have forgotten how to add it to my Notepad++, v7.9.1, installation, which I use all the time... If you could remind me of some of that, I could install it locally, and maybe do some more testing, and steps... my Notepad++ is installed in C:\Program Files\Notepad++...

But with some google searching, I copied the built Tidy2.dll to a new C:\Program Files\Notepad++\plugins\Tidy2 folder, and loading it through Settings->Import->Import plugins(s)..., and a Plugins->Tidy2 appeared, after a restart, after installing another listed plugin, Hex-Editor...

And it appears to work ok.. somehow 3 configs got included...

And is shown in Plugins->Plugins admin.. in the Installed tab... the Tidy2->About shows Tidy 5.7.44, but I guess that is wrong, or not, need to check the last install... maybe that needs to be manually updated, or something...

And I note I have published a Release v2.0.5, based on the 5.6.0 tidy release, if that is of any help...

Maybe will get around to published a later release...

Hope this helps...

@igll
Copy link
Author

igll commented Feb 20, 2021

Thanks a lot!

The steps I followed to get tidy2 work with Notepad++ v.7.9.1 are:

  1. Notepad++ > Plugins > Plugins admin > select Tidy2 Version 0.2 > Install
  2. Exit Notepad++
  3. Download https://github.com/geoffmcl/NppTidy2/releases/download/2.0.5/Tidy2-2.0.5-vc140-mt-32b.7z
  4. Extract it
  5. Copy the Tidy2.dll from the extracted files into C:\Program Files (x86)\Notepad++\plugins\Tidy2 Windows folder (Accepting the replacement)
  6. Open Notepad++ and enjoy tiding source scripts!

@geoffmcl
Copy link
Contributor

@igll, thank you for the further feedback...

Although this is not really related to this Tidy repo, it is good information to know... and document...

While we appear to be running the same Notepad++ version, v7.9.1, mine is the 64-bit version, thus installed in C:\Program Files\notepad++...

And when I open Plugins > Plugins admin, there is NO listing for Tidy2, in the Available tabs...

I guess, if I can find the time, energy, I should register my fork...

Of course, being a Tidy maintainer, I would not run a plugin, preferring to run the console app, tidy.exe, instead... and just noted, I have over 190 version available, back to a tidy04aug00.exe...

Just out of interest, I lit up my old WIN7-PC, which is upgraded to Windows 10, also 64-bit, running an old Notepad++ v5.9 (UNICODE), 32.bit, so is also in C:\Program Files (x86)\Notepad++, but it too does not show Tidy2 in Available, but I had installed a my 32-bit Tidy2.dll... and it looks like the Tidy2-2.0.5-vc100-md-32b version... and I am not about to upgrade anything in that old circa 2012 PC...

Anyway, glad to hear you got something working ;=))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants