On Tue, Sep 12, 2017 at 7:22 AM, john lunzer <[email protected]> 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 [email protected].
To post to this group, send email to [email protected].
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