One of the newer elements in HTML5 is the “main” element. Unfortunately, the syntax checker doesn’t recognise it, and marks the opening tag as an error; it then marks the closing tag with a warning.
Is there any way to convince Komodo Edit that it’s OK to use main?
Not ideal but try switching from using tidy for syntax checking to html5lib under
Prefs > Syntax Checking > Html5
Note I did not implement this and am not sure what the limitations are between either options, hopefully @toddw will be able to explain that better.
Thanks for your reply.
I set the options as you suggest, and it does indeed let “main” pass. Unfortunately, it also lets everything else pass, such as
<thing>. I take that to suggest that html5lib is not actually working.
I notice that on your screenshot that you’re using a Mac, which is also my case. I checked inside the Komodo app, and the
html5lib appears to be present.
I just added support for the main element:
You could tweak your koHTMLLinter.py file (in your Komodo 8.5 installation) to add that element too.
Just want to let you know I changed koHTMLLinter.py. I was afraid to do this, because I was afraid to destroy my Komodo installation. But for everybody else who’s possibly afraid to try this: it’s really easy. And that ‘main’ error is gone.
Thanks for the tip!
Man, I was understand your afraid if this fix will be created by non-developer, but in this case this fix was created by @toddw, so it means fix will be worked and fix will not break your Komodo. (because developer’s in most cases test they fixes before push it to main repository or a program ;))
If somebody afraid to change something in python files because they are don’t know Python as is - they are can download files
src/lint/koHTMLLinter.py from repository and just override it with original files in Komodo installation dir