You could collect the body text yourself,  It's not hard. For a selected 
node, you can find the entire subtree like this:

p = c.p
tree = [p]
tree.extend(p.subtree()) # tree includes entire tree starting at selected 
node

You can collect all the text from these nodes easily as long as you don't 
need to indent them according to their child level:

collected = ''
collected = [n.b for n in tree]
collected_text = '\n'.join(collected)

This won't work if you are using *@others* or *<< named sections>>. * It 
will also collect all Leo @-directives, so if you use them you would have 
to filter them out.  But as long as you only need the collected body text, 
this code should do the job.
On Sunday, May 23, 2021 at 4:42:54 PM UTC-4 Rob wrote:

> Based on the feedback, it sounds like the result is intentional, so I'll 
> file it as an enhancement, not a bug. That's what I wanted to know.
>
> I also wonder if the script I use might be modified in some way to 'not' 
> strip blank lines, i.e., copy all 'as is', making no modifications. That 
> would be the best fix for me in my use case.
>
> I got the original script code from Vitalije as I couldn't have done that 
> on my own.
>
> Rob...
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/fa050b10-1a73-4ac1-9af9-f76597382b7fn%40googlegroups.com.

Reply via email to