Page 1 of 1

Syntax highlighter

Posted: Mon Mar 09, 2015 3:18 pm
by ivelink
Hello
I am trying to make a python code editor that highlights keywords, operators and strings.
The problem of course is with the quotes as Python supports single, double and triple quotes for strings.
Ex:
x = 'some text'
x = "some text"
x = '''some text'''

Also i can't find a way to go back and modify my "script" in the field.
I tried with pass keyDown but it doesn't work well
How would you approach the problem ?


Thanks

Re: Syntax highlighter

Posted: Mon Mar 09, 2015 4:40 pm
by dunbarx
Hi.

Triple quotes? Is that a single char, or a single and a double quote stuck together? The itemDelimiter can be set to any char, and in v.7 (I believe) the itemDel can be a string of any length.

Does this help? If the itemDel can be of any length, I suppose it can be set to a string consisting of a single and a double quote. Now you should be able to parse your data.

Craig Newman