Rev c31c1b2 
<https://github.com/leo-editor/leo-editor/commit/c31c1b238a09e204d9c36b41ee7464f2d935c20c>
 
fixes #371 <https://github.com/leo-editor/leo-editor/issues/371> 
(execute-script 
fails when a node contains multiple @language directives 
<https://github.com/leo-editor/leo-editor/issues/371>). For example, you 
can execute the following:

@language rest
Comments
@language python
print('hi')
@language md
Another comment
@language python
print('abc')

The new g.extractExecutableString function is straightforward.  It removes 
all lines that are in the range of @language rest/md/markdown. In addition, 
it truncates the script, with a warning, if it sees two "executable" 
@language directives. 

*Important*: Even if a node contains multiple executable languages, say C 
and Python, the user can select a range of lines to execute. All will be 
well, provided the selected text contains at most one executable language.

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