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

syntax highlighting should alllow uncapitalized 'doctype' #1489

Open
medovina opened this issue May 3, 2017 · 2 comments
Open

syntax highlighting should alllow uncapitalized 'doctype' #1489

medovina opened this issue May 3, 2017 · 2 comments

Comments

@medovina
Copy link
Contributor

medovina commented May 3, 2017

When I edit an HTML document, Geany's syntax highlighter allows

<!DOCTYPE html>

But if I write 'doctype' in lowercase, the syntax highlighter marks 'doctype' in red. According to the HTML specification, 'doctype' is not case-sensitive:

https://www.w3.org/TR/html51/syntax.html#the-doctype

So the syntax highlighter should allow this.

@codebrainz
Copy link
Member

You need to change the sgml keywords in filetypes.html to add a lower-case doctype to the list (tested, it works). Probably none of those tags should be required to be only upper-case, but it would require fixing the HTML lexer from Scintilla to change that.

Refer to the user manual for information about customizing filetypes if you haven't done it before.

@elextr
Copy link
Member

elextr commented May 3, 2017

In all HTMLs and XHTMLs before HTML5 and in XHTML5 it is required to be upper case. As the lexer that highlights html is not sensitive to the version it can't change its habits based on the version.

The lexer itself comes from the Scintilla project so you would need to ask for it there to make it vary by version.

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

No branches or pull requests

3 participants