Hi Alex,

Not sure. The drawback is that it breaks a little bit the logic of the
> markup parser, which expects a single char plus a '{'.
>

Good catch, I didn't think of that.


> Perhaps a separate markup, with a dedicated character, is better? Let's
> use 'x' for now (though I try to avoid alphabetic characters, because
> they conflict more easily with the document's text itself):
>
>    x{myStyle
>       bla
>       /{text}
>    }
>

I agree, this is more readable and consistent with the rest of the the
markup.


> This would probably expand to a <span>, right?
>

I believe so. The text (not headers, lists, or links) is NOT parsed into
<p> tags, and just lives within the parent <div id=main>. So <span> would
be the right choice there. For the others, couldn't it expand into a
'class=' or 'id=' within the tag? So,

   x{myStyle
      /{This is the text}
   }

would expand to,

   <span class=myStyle><i>This is the text</i></span>


and

   x{myStyle
      1{This is the header}
   }

would become,

   <h1 class=myStyle>This is the header</h1>


Maybe this makes it more makes it more complicated than it needs to
be? <span> produces the desired results when used over headers, etc.


> What character should be used for the 'x'?
>

How about '$'? It's kind of an 'S' for "Style", and also the dollar
sign might imply that you're putting some "Bling" on your document :D

   ${superFly
      This text is /{super} fly!
   }

Anyway, the reason I ask about this... with such a mechanism, I could
(re)create the styled homepage entirely within the wiki structure. This
would greatly simplify the code as we wouldn't have to worry about
calling an external file and the associated session management
"plumbing" that we discussed. The website would simply be new CSS
for the existing wiki, with some reorganizing of documentation.

As far as implementation goes, we would just need to add a clause to
the 'render' function in 'wiki/lib.l', right? Something like

   ("$"    # Style
      (let Cls (till ... T) # get CSS class(es)
         (prin "<span class=\"" Cls "\">")
         (recurse T)        # render the rest
         (prin "</span>") ) )

and a way to upload/access CSS files for a given document. I'm not sure
what that would involve. What do you think?


Regarding the rest of the mail,

Basically, the current GUI is already a kind of markup
>
>    (gui '(+TextField) 40)
>

Very true hahaha I think this about sums it up :) Thanks for the response
and indulging my little thought experiment!


Cheers,
Erik

Reply via email to