Sorry, forgot to do the new attributes. I've not bothered with the fleet of ARIA[*] attributes here, as I haven't spent any time looking at ARIA and suspect that it's a moveable feast at present anyway.
async autocomplete autofocus contenteditable contextmenu draggable formaction formenctype formnovalidate formtarget list manifest max min novalidate pattern ping placeholder required reversed role sandbox scoped seamless sizes spellcheck srcdoc step
* http://www.w3.org/WAI/PF/aria/
On 10/23/2010 03:46 PM, Ross McKay wrote:
Sorry, forgot to do the new attributes. I've not bothered with the fleet of ARIA[*] attributes here, as I haven't spent any time looking at ARIA and suspect that it's a moveable feast at present anyway.
async autocomplete autofocus contenteditable contextmenu draggable formaction formenctype formnovalidate formtarget list manifest max min novalidate pattern ping placeholder required reversed role sandbox scoped seamless sizes spellcheck srcdoc step
Don't forget data-* (the attribute for providing user-specified data to a DOM node. It can be named anything, hence the *) This has been a bit of a thorn in my side, since Geany thinks all of my data-* tags are invalid; they get highlighted red.
On Mon, 25 Oct 2010 09:09:22 -0700 Jason Oster jason.oster@campnavajo.com wrote:
Don't forget data-* (the attribute for providing user-specified data to a DOM node. It can be named anything, hence the *) This has been a bit of a thorn in my side, since Geany thinks all of my data-* tags are invalid; they get highlighted red.
Is this the only stable missing attribute?
Nick
On 10/25/2010 10:31 AM, Nick Treleaven wrote:
On Mon, 25 Oct 2010 09:09:22 -0700 Jason Osterjason.oster@campnavajo.com wrote:
Don't forget data-* (the attribute for providing user-specified data to a DOM node. It can be named anything, hence the *) This has been a bit of a thorn in my side, since Geany thinks all of my data-* tags are invalid; they get highlighted red.
Is this the only stable missing attribute?
Nick
As far as I know, but I haven't read the entire spec, nor compared against what Geany currently supports in SVN! It appears the major players are there, with Ross's suggestions. e.g. attributes most likely to be used by web developers.
FYI, here is the specification for the data-* attribute. This is the current working draft for the HTML5 spec:
http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data...
Jason Oster wrote:
Don't forget data-* (the attribute for providing user-specified data to a DOM node. It can be named anything, hence the *) This has been a bit of a thorn in my side, since Geany thinks all of my data-* tags are invalid; they get highlighted red.
Yeah, but it's the * that Geany can't handle. Your * will likely be different to my *, unless we happen to be following the same microformats.
You can add your data-* attributes to your local customisation of filetypes.xml in ~/.config/geany/filedefs if you want to make that red go away.
What would be nice in Geany is some way to customise the filedefs in an additive way, rather than having to respecify the whole keyword line just to add a few new attributes. Or perhaps, this new HTML5/XHTML aware plugin we spoke about in the previous HTML5 thread could handle data-* and aria-* especially.
Either way, the stock distro can't really do anything with data-* yet. This is different to aria-* which we could add easily, I guess, if someone (else) wants to collect them all into a string:
http://www.w3.org/WAI/PF/aria/states_and_properties#state_prop_def
On 26 October 2010 10:16, Ross McKay rosko@zeta.org.au wrote:
Jason Oster wrote:
Don't forget data-* (the attribute for providing user-specified data to a DOM node. It can be named anything, hence the *) This has been a bit of a thorn in my side, since Geany thinks all of my data-* tags are invalid; they get highlighted red.
Yeah, but it's the * that Geany can't handle. Your * will likely be different to my *, unless we happen to be following the same microformats.
You can add your data-* attributes to your local customisation of filetypes.xml in ~/.config/geany/filedefs if you want to make that red go away.
What would be nice in Geany is some way to customise the filedefs in an additive way, rather than having to respecify the whole keyword line just to add a few new attributes. Or perhaps, this new HTML5/XHTML aware plugin we spoke about in the previous HTML5 thread could handle data-* and aria-* especially.
Recognising data-* as legal needs to be added to the Scintilla lexer. Perhaps creating an HTML5 one. You could discuss it with the Scintilla ML http://groups.google.com/group/scintilla-interest
Cheers Lex
Either way, the stock distro can't really do anything with data-* yet. This is different to aria-* which we could add easily, I guess, if someone (else) wants to collect them all into a string:
http://www.w3.org/WAI/PF/aria/states_and_properties#state_prop_def
Ross McKay, Toronto, NSW Australia "Nobody ever rioted for austerity" - George Monbiot _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 10/25/2010 04:36 PM, Lex Trotman wrote:
Recognising data-* as legal needs to be added to the Scintilla lexer. Perhaps creating an HTML5 one. You could discuss it with the Scintilla ML http://groups.google.com/group/scintilla-interest
Cheers Lex
I'm familiar enough with Scintilla hacking that I might just work on such a patch. Adding "my" data-* attributes is not sufficient; they will change from project-to-project, depending on its needs.
With the Scintilla lexer able to expand asterisks, Geany can use the literal string "data-*" (and aria-* if you really wanted). I like it! Thanks for the direction.
Jason Oster wrote:
I'm familiar enough with Scintilla hacking that I might just work on such a patch. Adding "my" data-* attributes is not sufficient; they will change from project-to-project, depending on its needs.
With the Scintilla lexer able to expand asterisks, Geany can use the literal string "data-*" (and aria-* if you really wanted). I like it!
Good stuff, I'll stand back and watch :) and will applaud wildly when it comes through!
cheers, Ross
On 10/26/2010 06:57 PM, Ross McKay wrote:
Good stuff, I'll stand back and watch :) and will applaud wildly when it comes through!
cheers, Ross
A patch against Scintilla's trunk (in Mercurial) has been posted to the scintilla-interest list[1]. I tested the code in Geany using a similar patch. Scintilla trunk patches won't apply cleanly to the Scintilla included with Geany, since it's an older version and has a slightly different directory structure.
So attached is the patch I used to test the feature! It applies against the Geany trunk currently in SVN. Major difference between this patch and the one for trunk is that this includes the "if (!sorted)" block in WordList::InListWildcard(), as WordList::InList() and WordList::InListAbbreviated() already have. The method is also not declared const, again just like the other two.
All-in-all, I say don't use *this* patch, just update to Scintilla 2.23 some day and get the wildcard matches for free. ;) Although, you can already start using data-* and aria-* in filetypes.xml right now. It will have no visible effect until Scintilla supports wildcards, because an asterisk (*) is not a valid attribute character.
[1] http://groups.google.com/group/scintilla-interest/browse_thread/thread/40780...
On 10/27/2010 12:34 PM, Jason Oster wrote:
[1] http://groups.google.com/group/scintilla-interest/browse_thread/thread/40780...
Neil informed me of the ^prefix syntax supported in Scintilla's keyword handling code. (I should have noticed it; I copy-pasted it directly into the InListWildcard() method!)
Adding keywords ^data- and ^aria- works, but note that "data" is already defined as a keyword. I've changed that keyword to ^data- with some success. Sadly, the prefixes alone "data-" and "aria-" get styled, which looks odd and is explicitly against the spec.
But hey, it works for now.
Jason Oster wrote:
Neil informed me of the ^prefix syntax supported in Scintilla's keyword handling code. (I should have noticed it; I copy-pasted it directly into the InListWildcard() method!)
Excellent work, mark that one up as "solved" :)
Adding keywords ^data- and ^aria- works, but note that "data" is already defined as a keyword. I've changed that keyword to ^data- with some success. Sadly, the prefixes alone "data-" and "aria-" get styled, which looks odd and is explicitly against the spec.
But hey, it works for now.
Actually, once I get to data- the whole attribute becomes styled. That's with Geany built from svn updated this morning, i.e. r5336. Perhaps your patch has changed that.
Thanks for sorting that out, I can clean up my local config file now!
cheers, Ross
Jason Oster wrote:
On 10/27/2010 12:34 PM, Jason Oster wrote:
[1] http://groups.google.com/group/scintilla-interest/browse_thread/thread/40780...
Neil informed me of the ^prefix syntax supported in Scintilla's keyword handling code. (I should have noticed it; I copy-pasted it directly into the InListWildcard() method!)
Adding keywords ^data- and ^aria- works, but note that "data" is already defined as a keyword. [...]
I just noticed the bit about "data", and read your thread on scintilla-interest. Note that "data" is an attribute of the "object" element:
http://www.whatwg.org/specs/web-apps/current-work/#the-object-element https://developer.mozilla.org/en/HTML/Element/object http://msdn.microsoft.com/en-us/library/ms535859%28v=VS.85%29.aspx
I get your point (scintilla-interest thread) about data- not being valid, but Scintilla syntax colouring != HTML5 validation and validator.w3.org will tell you "Attribute data- not allowed..." (in addition to picking up other nicely styled attributes that don't belong). It may not be worth taking this any further, I reckon.
On 10/27/2010 07:09 PM, Ross McKay wrote:
I get your point (scintilla-interest thread) about data- not being valid, but Scintilla syntax colouring != HTML5 validation and validator.w3.org will tell you "Attribute data- not allowed..." (in addition to picking up other nicely styled attributes that don't belong). It may not be worth taking this any further, I reckon.
Concurred. Validation is outside of Scintilla's scope (and Geany's, for that matter). It helps that together they are able to point out potential problems. I only made the point just to make it, not because I want to follow up on it. ;)
Thanks.
On Wed, 27 Oct 2010 15:19:39 -0700 Jason Oster jason.oster@campnavajo.com wrote:
Neil informed me of the ^prefix syntax supported in Scintilla's keyword handling code. (I should have noticed it; I copy-pasted it directly into the InListWildcard() method!)
Adding keywords ^data- and ^aria- works, but note that "data" is already defined as a keyword. I've changed that keyword to ^data- with some success. Sadly, the prefixes alone "data-" and "aria-" get styled, which looks odd and is explicitly against the spec.
But hey, it works for now.
OK, removed data and added the prefix keywords.
Nick
Nick Treleaven wrote:
OK, removed data and added the prefix keywords.
Nick, data is a valid attribute for (at least) the object element:
http://www.whatwg.org/specs/web-apps/current-work/#the-object-element https://developer.mozilla.org/en/HTML/Element/object http://msdn.microsoft.com/en-us/library/ms535859%28v=VS.85%29.aspx
On 10/28/2010 07:00 AM, Ross McKay wrote:
Nick Treleaven wrote:
OK, removed data and added the prefix keywords.
Nick, data is a valid attribute for (at least) the object element:
http://www.whatwg.org/specs/web-apps/current-work/#the-object-element https://developer.mozilla.org/en/HTML/Element/object http://msdn.microsoft.com/en-us/library/ms535859%28v=VS.85%29.aspx
Might as well keep 'data' and add '^data-', in that case.
On Thu, 28 Oct 2010 08:02:25 -0700 Jason Oster jason.oster@campnavajo.com wrote:
On 10/28/2010 07:00 AM, Ross McKay wrote:
Nick Treleaven wrote:
OK, removed data and added the prefix keywords.
Nick, data is a valid attribute for (at least) the object element:
http://www.whatwg.org/specs/web-apps/current-work/#the-object-element https://developer.mozilla.org/en/HTML/Element/object http://msdn.microsoft.com/en-us/library/ms535859%28v=VS.85%29.aspx
Might as well keep 'data' and add '^data-', in that case.
Re-added data. (I added ^data- and ^aria- already).
Nick
On Tue, 26 Oct 2010 10:16:18 +1100 Ross McKay rosko@zeta.org.au wrote:
You can add your data-* attributes to your local customisation of filetypes.xml in ~/.config/geany/filedefs if you want to make that red go away.
What would be nice in Geany is some way to customise the filedefs in an additive way, rather than having to respecify the whole keyword line just to add a few new attributes.
I agree this would be useful, so any updated system settings are not lost by an overridden user setting. E.g. for filetype extensions.
Or perhaps, this new HTML5/XHTML aware plugin we spoke about in the previous HTML5 thread could handle data-* and aria-* especially.
As Lex said, '*' matching could be implemented in the Scintilla lexer.
BTW I'm not convinced HTML 4 and 5 are so different to warrant different support. Hopefully a single lexer can handle both reasonably well. It may be possible to make a custom filetype based on the HTML filetype to separate v4 and v5; not sure if it's worth it.
Nick
Nick Treleaven wrote:
[...] BTW I'm not convinced HTML 4 and 5 are so different to warrant different support. Hopefully a single lexer can handle both reasonably well. It may be possible to make a custom filetype based on the HTML filetype to separate v4 and v5; not sure if it's worth it.
I reckon you're right. I'll investigate. (The only advantage I see in having support for HTML4 vs HTML5 vs XHTML is removing the tags specific to the "other" "standards" so that they show up in red in the code; however, a decent validator will tell the developer this anyway, and more, so perhaps not worth the bother so much) -- Ross McKay, Toronto, NSW Australia "The lawn could stand another mowing; funny, I don't even care" - Elvis Costello
On Sun, 24 Oct 2010 09:46:12 +1100 Ross McKay rosko@zeta.org.au wrote:
Sorry, forgot to do the new attributes. I've not bothered with the fleet of ARIA[*] attributes here, as I haven't spent any time looking at ARIA and suspect that it's a moveable feast at present anyway.
async autocomplete autofocus contenteditable contextmenu draggable formaction formenctype formnovalidate formtarget list manifest max min novalidate pattern ping placeholder required reversed role sandbox scoped seamless sizes spellcheck srcdoc step
Committed.
Nick