RE: [cl-wiki-devel] Re: New Release CL-WIKI 0.0.4

I can tell already that I'm really going to get a lot of use out of the config file :) I really appreciate that it's just a plain lisp file as well, and not a text file with a custom parser.
Did somebody say power of Lisp? ;-)
External links get the class "external" + the url scheme. rel="nofollow" is used.
That's a really good idea; makes me wish I'd thought of it first.
Is there syntax for HTML effects like, H1, bold, italic, numbered list, unnumbered list, etc.?

On 9/6/05, Emre Sevinc <emres@bilgi.edu.tr> wrote:
Is there syntax for HTML effects like, H1, bold, italic, numbered list, unnumbered list, etc.?
There's no way to include raw HTML tags in the wiki content, if that's what you mean. There are a couple of different standards, I think, for including things like <h1>, <h2>, that are really easy to implement. Something like this: ****This is a heading**** --> <h1>This is a heading</h1> ***This is a subheading*** --> <h2>This is a subheading</h2> (h2 and h3 would probably be better, and reserve h1 for the page title in the template) Lists are more complicated; they are usually formatted somthing like this: . First list element . Second list element for unordered lists, and 1. First list element 2. Second list element for ordered lists (the actual numbering doesn't do anything, but the fact that there are numbers there tells the wiki engine to use an <ol> tag). Those are much more difficult to implement, and I'm not certain that they can be done with regular expression replacement at all. CL-wiki already has bold and italic effects, in the form of <em> and <strong> tags (use double and triple quote marks, respectively). The CSS almost always makes those into italic and bold fonts. Regards, Ian Clelland <clelland@gmail.com>

Ian Clelland wrote:
On 9/6/05, Emre Sevinc <emres@bilgi.edu.tr> wrote:
Those are much more difficult to implement, and I'm not certain that they can be done with regular expression replacement at all.
No way :( Actually, theoretically it is possible. This is especially very hard to do when nested lists are in concern. On the other hand, thinks like headings can be easily added. I propose adding a #'complex-replace for complicated tasks. #'simple-replace is simple enough to be modified by anyone else. Formatting lists is a matter of following the context. We should first start an <ul> or <ol> if and only if the list item is the first list item of the following item sequence and close it when the sequence is finished. We should use some flags for this process. Any other idea? --vst

On 2005-09-07 08:58:35, Vehbi Sinan Tunalioglu wrote:
Formatting lists is a matter of following the context. We should first start an <ul> or <ol> if and only if the list item is the first list item of the following item sequence and close it when the sequence is finished. We should use some flags for this process. Any other idea?
I've changed the way translation is done with 0.0.4. Now it's only one *REPLACE-LIST* and one function TRANSLATE-WIKI-CODE. The magic lies within CL-PPCRE's REGEX-REPLACE-ALL which can have a really complex replacement parameter: http://weitz.de/cl-ppcre/#regex-replace To replace [[foo]] with an internal link with URL encoded page name: ("\\[\\[(.*?)\\]\\]" . ,(list "<a href=\"" 'rep-url-encoder-1 "\">" 0 "</a>")) The register counting starts at 0 when you use this notation. And the best part is the function designator! Wonderful things could be done with this. I've just tested a Regex in The Regex Coach <http://weitz.de/regex-coach/> which could be used for lists. I'll try to implement it tomorrow. Here's the regex: ^\*.*?(?=^[^\*]|\z) (with m and s active - multi-line-mode and single-line-mode) This has matched a complete bullet list with a "*" on the beginning of each line. Regards, Stefan
participants (4)
-
Emre Sevinc
-
Ian Clelland
-
Stefan Scholl
-
Vehbi Sinan Tunalioglu