I had gotten close to getting past the trickiness before I got slammed at 
work leaving no time after work for hobby dev. 

There is a lot I don't understand about the Qt/PyQt highlighter, running 
Leo in the debugger around the highlighting code was rough. Do you remember 
if there were any resources you used when initially writing the highlighter?

I'd still like to get this done if work lets up.

On Thursday, September 21, 2017 at 11:38:25 AM UTC-4, Edward K. Ream wrote:
>
> On Tue, Sep 12, 2017 at 7:22 AM, john lunzer <lun...@gmail.com 
> <javascript:>> wrote:
>
>> I've been pouring through the syntax highlighting code and I think I've 
>> actually come up with a pretty elegant solution: custom highlighting rules
>>
>> The QSyntaxHighlighter is likely the best option for this. Basically 
>> rather than matching a regex syntax in a headline you would use the newly 
>> proposed directive *@highlight*. So for the simplest example, as it 
>> relates to clone-find-all and clone-find-flat, given the search term 
>> ​​
>> LeoHighlighter the Found collection node would include the directive 
>> @highlight 
>> ​​LeoHighlighter. The syntax highlighter would then either highlight or 
>> underline for every instance of the string "LeoHighlighter".
>>
>
> ​Yes, I think this could work.  Implementing it could be tricky, because 
> entering any node would potentially push or pop a stack of custom rules.  
> Furthermore, these rules would themselves be non-trivial to do. For 
> example, when @language python is in effect the custom rules would affect 
> virtually all the data structures in leo\modes\python.py.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to