@Félix
I updated the leo sample. I created a @metadata node that contains the
@title and @sub-title nodes. And I moved the @tool-tip into the body.
Attached is the updated leo file.
I've go the @metadata children parsing down. Now I'm working on parsing
the node body.
On Wednesday, September 10, 2025 at 11:00:39 PM UTC-4 Félix wrote:
> @Edward @Thomas @jkn
>
> Ah! I'm so silly! Here's a much better (and smaller) minimal example
> who's output can be saved in a file and dragged onto your browser, using
> vnodes instead of positions. (uncomment that line for bodies too):
>
>
> output = ''
> indentation = ' '
> level = -1
>
> def doChildren(children, level=0):
> global output
> for child in children:
> indent = indentation * level
> output += f"\n{indent} <li>"
> output += f"\n{indent} <b>{child.headString()}</b>"
> # output += f"\n{indent}
> <pre>\n{child.bodyString()}\n{indent} </pre>"
> output += f"\n{indent} <ul>"
> doChildren(child.children, level + 1)
> output += f"\n{indent} </ul>"
> output += f"\n{indent} </li>"
>
> output += "<ul>"
> doChildren(c.hiddenRootNode.children)
> output += "\n</ul>"
> g.es(output)
>
>
> @brian I havent had the chance to look at your source leo file... (I didnt
> notice it, and had only looked at your 'desired output file' oops !!)
>
> I now understand your @tool-tip nodes and what you were going for.
>
> I'll have some more time in the weekend to make a script that really goes
> from your leo file example to your 'desired' output HTML file.
>
> Again - thanks for your interest in Leo - and sorry for that delay!
>
> Félix
> On Tuesday, September 9, 2025 at 1:29:48 PM UTC-4 Edward K. Ream wrote:
>
>> On Tue, Sep 9, 2025 at 11:37 AM brian <[email protected]> wrote:
>>
>>> @Félix
>>>
>>> I cannot see the suggestions by Edward about merging that
>>> 'all_root_children' into the commander's generators.
>>>
>>
>> The devel branch now contains the new code. I merged it a few hours ago.
>>
>> 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 view this discussion visit
https://groups.google.com/d/msgid/leo-editor/8631467c-9553-4789-b88e-8030c9d9a7d0n%40googlegroups.com.
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo: https://leo-editor.github.io/leo-editor/leo_toc.html -->
<leo_file xmlns:leo="https://leo-editor.github.io/leo-editor/namespaces/leo-python-editor/1.1" >
<leo_header file_format="2"/>
<globals/>
<preferences/>
<find_panel_settings/>
<vnodes>
<v t="brian.20250910125739.1"><vh>@metadata</vh>
<v t="asdfafdsafdasfdsa.20250903214546.2"><vh>@title</vh></v>
<v t="asdfafdsafdasfdsa.20250903214822.1"><vh>@sub-title</vh></v>
</v>
<v t="brian.20250910125936.1"><vh>Section 1</vh>
<v t="brian.20250910125936.2"><vh>Section 1.1</vh>
<v t="brian.20250910125936.3"><vh>Section 1.1.1</vh></v>
</v>
</v>
<v t="asdfafdsafdasfdsa.20250903215439.1"><vh>Section 2</vh>
<v t="asdfafdsafdasfdsa.20250903215607.1"><vh>Section 2.1</vh></v>
</v>
<v t="asdfafdsafdasfdsa.20250903215802.1"><vh>Section 3</vh>
<v t="asdfafdsafdasfdsa.20250903215920.1"><vh>Section 3.1</vh></v>
</v>
</vnodes>
<tnodes>
<t tx="asdfafdsafdasfdsa.20250903214546.2">Documentation with Collapsible Sections</t>
<t tx="asdfafdsafdasfdsa.20250903214822.1">Click on a heading to expand or collapse its content.</t>
<t tx="asdfafdsafdasfdsa.20250903215439.1">@tool-tip Quick: Save changes before switching configuration modes.
This is the content under Section 2.</t>
<t tx="asdfafdsafdasfdsa.20250903215607.1">@tool-tip Reminder: Use secure keys in production builds.
This is nested content under Section 2.1.</t>
<t tx="asdfafdsafdasfdsa.20250903215802.1">@tool-tip FYI: This section lists recent release changes.
This is the content under Section 3.</t>
<t tx="asdfafdsafdasfdsa.20250903215920.1">@tool-tip Pro tip: Run heavy tasks in batch mode to save time.
This is nested content under Section 3.1.</t>
<t tx="brian.20250910125739.1"></t>
<t tx="brian.20250910125936.1">@tool-tip Random tip: Rotate the knob gently to start calibration.
This is the content under Section 1.</t>
<t tx="brian.20250910125936.2">@tool-tip Note: This option affects thermal drift in low-power modes
This is nested content under Section 1.1.
</t>
<t tx="brian.20250910125936.3">@tool-tip This is the content under Section 2.
This is even more deeply nested content under Section 1.1.1.</t>
</tnodes>
</leo_file>