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?
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.
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 ;))
I think maybe I was a bit unclear. It was not the fix I was afraid of. I was afraid to do something wrong myself with a good fix, because I’ve no experience at all with python. That’s why I wrote my reply, because maybe there are more people who know css, html and JavaScript, but have no experience with python.
If somebody afraid to change something in python files because they are don’t know Python as is - they are can download files contrib/catalogs/html5/html5.dtd and src/lint/koHTMLLinter.py from repository and just override it with original files in Komodo installation dir