[EMAIL PROTECTED] ha scritto:

> 
>   Near as I can tell, this rule matches the principle shown in Carl's
> stuff below:
> 
> headrule: [ some [newline |
>         "===" [[copy header to newline]
>         (       append header " (FIRST LEVEL)"
>                 append full-contents header)]           |
>         "---" [[copy header to newline]
>         (       append header " (SECOND LEVEL)"
>                 append full-contents header)]]
> ]
> 
>   Neat thing about this is it doesn't even return true, let alone give
> me a listing of either FIRST, -o-r- SECOND level text in full-contents.

Try with:

>> headrule: [
[    some [
[        newline |
[        "====" copy header to newline (
[        insert tail header " (FIRST LEVEL)"
[        insert tail full-contents header
[        )
[        |
[        "----" copy header to newline (
[        insert tail header " (SECOND LEVEL)"
[        insert tail full-contents header
[        )
[        ]
[    end
[    ]
== [
    some [
        newline | 
        "====" copy header to newline (
            insert tail header " (FIRST LEVEL)" 
       ...
>> full-contents: make block! 10
== []
>> text: {
{    ====First line
{    ====Second line
{    ----Third line
{    ====Fourth line
{    ----Fifth line
{    ----Last line
{    }
== {
====First line
====Second line
----Third line
====Fourth line
----Fifth line
----Last line
}
>> parse text headrule
== true
>> full-contents
== ["First line (FIRST LEVEL)" "Second line (FIRST LEVEL)" "Third
line (SECOND LEVEL)" "Fourth line (FIRST LEVEL)" "Fifth line
(SEC...

Ciao,
    /Gabriele./
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC     \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o

Reply via email to