(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-43) was last changed on 26-Sep-2007 09:06 by ChuckSmith  

This page was created on 29-Aug-2006 01:46 by 85.221.141.46

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 53 added 15 lines
----
The syntax decision made by MediaWiki for bold and italics is actually really bad for coding purposes... it turns out that just having the same symbols used for both bold and italics markers (which are commonly nested) makes it so we can't use an efficient, formal parser. Worse than just counting quotes, the problem comes from these two lines:
{{{
'''''Bold and italics''' just italics''
'''''Bold and italics'' just bold'''
}}}
Believe it or not, it's theoretically impossible to parse this into a useful syntax-tree format without unlimited lookahead capabilities (you can't decide whether to start bold or italics first) - and using unlimited lookahead every time we use bold or italics has a real performance penalty. You can manage this with a two-pass parser, but I think it just ends up forcing unnecessary complexity into the programming side.
Besides, I think it's much more intuitive to use {{{**bold**}}} and {{{//italics//}}}... as noted below, there's only one case where {{{**bold**}}} and bullet lists can conflict, and it's visually obvious. Also, {{{//italics//}}} don't need to conflict with URLs - raw URLs should usually be {{{<pre>}}}-style things or links. When the user really wants a raw URL in the text, this can actually be parsed pretty simply; all the parser needs to do is to recognize URLs as special. This is really easy, as the problematic URLs are very easy for a parser to recognize - MediaWiki actually does an excellent job of this when detecting so-called "freelinks".
-- EPAstor
Version Date Modified Size Author Changes ... Change note
43 26-Sep-2007 09:06 13.375 kB ChuckSmith to previous restore
42 26-Sep-2007 01:00 13.415 kB 218.58.136.4 to previous | to last
41 26-Sep-2007 00:59 13.404 kB 59.45.211.51 to previous | to last
« This page (revision-43) was last changed on 26-Sep-2007 09:06 by ChuckSmith