(anonymous guest) (logged out)

Copyright (C) by the contributors. Some rights reserved, license BY-SA.

Sponsored by the Wiki Symposium and the Nuveon GmbH.


Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-11) was last changed on 27-May-2008 17:45 by ChristophSauer  

This page was created on 15-Dec-2006 17:53 by RadomirDopieralski

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
comment1, http://www.ittoolbox.com/profiles/buy_Naprosyn_here buy naprosyn online, %P, http://www.ittoolbox.com/profiles/buy_Zyprexa_here buy zyprexa, xhfynv, http://www.ittoolbox.com/profiles/buy_Proscar_here buy proscar online, pckn, http://www.ittoolbox.com/profiles/buy_Depakote_here depakote, pqinkb, http://www.ittoolbox.com/profiles/buy_Azulfidine_here azulfidine, iaaki, http://www.ittoolbox.com/profiles/buy_Arimidex_here buy arimidex, %-]]], http://www.ittoolbox.com/profiles/buy_Geodon_here geodon, vmt, http://www.ittoolbox.com/profiles/buy_Gyne_Lotrimin_here gyne-lotrimin, 8))),
!Braindamaged substitution
This is the simplest parsing method, used by some scratch wikis and "write a wiki in minimal number of lines of code" engines. It's pretty easy to uderstand and implement in any language that supports regular expressions, but is very limited and not guaranteed to produce valid html. Still, it works most of the time
The idea is to apply a number of regexp subtitutions:
s/\[\[(\w+)\]\]/<a href="wiki?\1">\1</a>/
s/\[\[(\w+)\|(.*)\]\]/<a href="wiki?\1">\2</a>/
s/\[\[(http:[^\]|]*)\]\]/<a href="\1">\1</a>/
s/\[\[(http:[^|]*)\|(.*)\]\]/<a href="\1">\2</a>/
You get the point. This technique has a number of drawbacks:
* no mixing of //**bold italic**//
* no markup inside lists, headings, etc.
* no mixing of list types, unless a large number of regexps is introduced to accommodate them (like /\n\*\#\*/ etc.)
* limited number of headings and list levels
* impossible (or extremely hard) to accommodate special cases like the \n --> <br> in paragraphs only, or the list/bold special case
* impossible to distinguish different levels of indentation
!Two-level regular expressions
This is a very popular approach. It's pretty fast, as it scans the raw text exactly two times.
The idea is to create two kinds of regular expressions -- one to split the text into blocks of different kinds (paragraphs, headings, lists, preformatted blocks, etc.) and then process each of them with different character-level regular expression.
Version Date Modified Size Author Changes ... Change note
11 27-May-2008 17:45 2.211 kB ChristophSauer to previous restore
10 27-May-2008 14:13 0.603 kB to previous | to last comment1, http://www.ittoolbox.com/profiles/buy_Naprosyn_here buy naprosyn onlin
9 01-May-2008 15:40 2.211 kB ChristophSauer to previous | to last restore
8 28-Apr-2008 10:21 0.022 kB to previous | to last UdvHUpQMFzXUj
7 28-Apr-2008 08:39 2.211 kB ChristophSauer to previous | to last revert spam
6 28-Apr-2008 01:03 0.021 kB to previous | to last kTLXmGXKLydgsqZV
5 27-Apr-2008 16:51 2.211 kB IvanFomichev to previous | to last revert spam
4 27-Apr-2008 02:16 0.189 kB to previous | to last iOwadNEXjdfHxJIqjG
3 18-Oct-2007 23:47 2.211 kB to previous | to last Fixed spelling
2 15-Dec-2006 20:38 2.208 kB RadomirDopieralski to previous | to last
1 15-Dec-2006 17:53 1.764 kB RadomirDopieralski to last braindamaged substitution
« This page (revision-11) was last changed on 27-Mai-2008 17:45 by ChristophSauer