Version: 1.33 "built on or after 2018-02-28" A highlighter can be chosen manually of course, but upon opening html files, Geany correctly chooses the HTML highlighter, but with HTM files, it does not.
Indeed, because even if Geany's *filetype_extensions.conf* list `*.htm` under `HTML`, the patterns are case sensitive so won't match `foo.HTM`. We could add various uppercase variants including `HTM` and `HTML`.
PS: and no, just being case insensitive is not really an option, as some extensions are case sensitive, like `.C` which is C++, but `.c` is C. Maybe we could consider as an option to perform a second case-insensitive pass in case we didn't find a match.
Note that html files have to fail a test for starting with `<html` or `<!DOCTYPE html` before the extensions are even looked at. So they must be not properly formed HTML files.
@elextr do you know if we support `<HTML`? I wouldn't be surprised a file with the extension `HTM` used uppercase tags…
@b4n, [Geany](https://github.com/geany/geany/blob/97547edb52e34b8f78f44a13548a0fb55baf1a44... lower case only AFAICT.
Note that html files have to fail a test for starting with `<html` or `<!DOCTYPE html` before the extensions are even looked at. So they must be not properly formed HTML files.
Ironically I have web design students learning how to add the DOCTYPE but it is not the first step of the instructions :/
Ironically I have web design students learning how to add the DOCTYPE but it is not the first step of the instructions :/
It is on [w3cschools](https://www.w3schools.com/html/html5_intro.asp) :-D
Something to think about: Browsers could expect correctly formed html, but html editors are guaranteed to contain html that either needs errors corrected or content updated.
github-comments@lists.geany.org