Re: [code] [textadept] HTML lexer

From: Mitchell <m.att.foicica.com>
Date: Tue, 24 Dec 2013 16:45:18 -0500 (Eastern Standard Time)

Hi Robert,

On Mon, 23 Dec 2013, Robert Gieseke wrote:

> Hi Mitchell,
>
> Am 12/23/13, 3:15 AM, schrieb Mitchell:
>>> Am 12/18/13, 6:48 AM, schrieb Mitchell:
>>> 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
>>
>> They should have their own "deprecated" token that perhaps could at
>> least have its own style. Patches are good, thanks.
>>
>
> I don't know if it's worth the effort, I experimented with a
> deprecated_elements list, but with attributes it gets quite complicated.
> Deprecated in HTML4, removed in HTML5
> Maybe it would be okay to just cover the current ones and let the user
> decide if an unknown element/attribute is a typo or legacy code,
> assuming new HTML file get written as HTML5?
>
> My updated test file is at: https://gist.github.com/rgieseke/8088593
>
> My changes to the lexer are at: https://gist.github.com/rgieseke/8099447

Okay, I agree it doesn't sound like it's worth it. I'll commit your
changes later. Thanks for spending some time on this.

> [snip]
> Known issues/questions:
> - I don't know if ':-' is still necessary in the attributes list if the
> approach to only handle 'modern' items is chosen, this is probably for
> xml stuff?

I thought it was present in XHTML documents... but it's been so long I
don't remember.

> - boolean minimized attributes are currently not covered, due to
> checking for an equal sign, for example <button disabled>.

I don't know who thought it was a good idea to have boolean attributes...
Anyway, it's going to be tough to handle them properly from a performance
perspective. I'm not sure it's worth it.

Cheers,
Mitchell

-- 
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 Tue 24 Dec 2013 - 16:45:18 EST

This archive was generated by hypermail 2.2.0 : Wed 25 Dec 2013 - 06:49:14 EST