[code] [textadept] HTML lexer

From: Robert Gieseke <rob.g.att.web.de>
Date: Sun, 22 Dec 2013 22:37:48 +0100

Hi Mitchell,

Am 12/18/13, 6:48 AM, schrieb Mitchell:
>>> * Rename lexers
>>> 'hypertext' -> 'html'
>> This can probably be done. Hypertext is a relic from Scintilla but I
>> think we can move on from it.
>
> This is now in hg. I hope it doesn't break anything. It was a bigger
> change than I thought...

thanks a lot!

Testing this I noticed some embedding not being properly detected.
My test file is at https://gist.github.com/rgieseke/8088593

I think this can be fixed by changing the embed_start_tag pattern on
l.115 in lexers/html.lua to

-- Tags that start embedded languages.
M.embed_start_tag = tag * element * (ws^1 * attribute * ws^0 * equals *
                         ws^0 * string)^0 * ws^0 * tag

This makes it possible again to have the plain style/script tags.

There are some HTML5 tags that are currently missing, so I wondered what
the 'policy' is with deprecated tags and attributes. Should all be
supported/lexed? I'm happy to provide a patch

Cheers,
Robert

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 22 Dec 2013 - 16:37:48 EST

This archive was generated by hypermail 2.2.0 : Mon 23 Dec 2013 - 06:36:01 EST