I was just testing a structure like this, which is valid leo and would
produce a valid (but ugly and errorprone) js file too.

+ @path ~/tmp/
+- /tstLeo/
    +- @auto xx.js
        +- xx declarations
            +- << some text >>

====
a)
node: "@auto xx.js" contains:

@language javascript
@tabwidth -4
@others

====
b)
node "xx declarations" contains:

/* some comments */
var text1 = '<< some text >>';

====
c)
node "<< some text >>" contains:
<'+'< the text >>

===================================

The problem here is, that according to Murphy's law, case c) will
break.

So what if we use a @plain directive, that just inserts the node
header into the section.

eg:
+ @path ~/tmp/
+- /tstLeo/
    +- @auto xx.js
        +- xx declarations
            +- @plain << some text >>

If the node "@plain << some text >>" body is empty,
- it inserts "<< some text >>"

If the node body is not empty, it inserts the plain node content,
without any further section replacement.

Would this be a doable escape mechanism?
What do you think?

I'm just brainstorming
- I didn't think about usability at the moment.
- I didn't think about a @shadow xx.js instead of @auto xx.js
- I didn't think about a "reload from file" for xx.js

have fun!
-mario

-- 
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