On Fri, Nov 4, 2011 at 11:31 AM, Josef <[email protected]> wrote:

> So, I am looking for a way to enable all the usual Leo goodies inside
> Python strings.

Certainly the colorizer could be expanded to handle this, at least for
Python strings.  It involves creating a so-called delegate colorizer.
Already on the to-do list: separate colorizer colors for delegates.

A little known fact: @others and section references **are** recognized
inside strings (and comments), as I have just verified.  Put this in
an @file node::

   '''A docstring.
   << imports >>
   @others
   What happens?
   '''
   # After the docstring.

Add the << imports >> section and other children.  Save.  Look at the
result.  It may not be pretty, but @others and the section reference
are handled as always.

In fact, this *must* be so:  Leo's read and write logic are completely
independent of language, except for comment delimiters.  In
particular, they knows absolutely *nothing* about strings.  Thus,
@others and section references are valid *everywhere*, even in
comments and strings.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to