[QScintilla] XML and Python Lexer suggestions

Phil Thompson phil at riverbankcomputing.com
Fri Nov 14 18:26:50 GMT 2008


On Fri, 14 Nov 2008 18:10:04 +0000, Baz Walter <bazwal at ftml.net> wrote:
> Phil Thompson wrote:
>> On Fri, 14 Nov 2008 17:23:14 +0000, Baz Walter <bazwal at ftml.net> wrote:
>>> i think we're on the same page here - it's just that you're better at 
>>> explaining it than i am :) the property defaults to styling the content

>>> of script tags *as scripts*, rather than as cdata; this makes it *look 
>>> like* a bug because the xml lexer doesn't set fonts/colours for
embedded
>>>
>>> scripts.
>> 
>> It does now.
> 
> so it seems we're not quite on the same page, then. you want to style 
> embedded scripts by default and have a method to switch this behaviour 
> off, right?

Yes - because that is the default Scintilla behaviour.

>>> so the property needs to be set to false (i.e. not allow 
>>> scripts) to style cdata correctly.
>>>
>>>> A future version will allow you to disable the styling of scripts.
>>> i have a patch 95% done for this and i should be able to send it to you

>>> later this evening. i'm calling it allowScripts() and it will default
to
>>>
>>> false - is this okay?
>> 
>> The default should be the same as the Scintilla lexer, ie true. I'm not
>> keen on the name as it's confusing.
> 
> okay, i had it defaulting to true to start with as this maintains the 
> existing behaviour. so a better name might be something like: 
> disableScriptStyling or perhaps just disableScripts.

To be consistent with other similar flags it should be something like...

void setScriptStyling(bool styling);
bool scriptStyling() const;

>>> one more thing. while looking into this, i noticed that there are some 
>>> properties missing for some of the other lexers as well. so i thought i

>>> could have a go at filling in some of the remaining gaps during the 
>>> weekend. would this be useful to you?
>> 
>> Yes - but they won't go into the next version which will just fix the
>> regression (and the "as" keyword which won't break anything).
> 
> i see, so you're just bug-fixing for 2.3.x, now.
> 
> this is something i have been meaning to ask you about: what are the 
> development plans for qscintilla? will you continue supporting qt3?

I don't see any reason not to. There is a common code base (although you
don't see that in the distributed source packages), so it isn't a huge
burden.

Phil


More information about the QScintilla mailing list