(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 17-Dec-2007 18:47 by YaroslavStavnichiy  

This page was created on 28-Aug-2006 11:25 by Christoph

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 372 added 102 lines
Moved part of discussion to [Talk.RequireSpaceAfterBulletProposal].
----
How about allowing spaces __in between__ the atserisks/hashes? I've seen at least one user trying to escape the bold markup this way and I think it's pretty creative. Would it collide with something?
-- RadomirDopieralski, 2007-01-22
Here is another problem, maybe someone can give some advice. My parser coudn't handle the "smart" resolving of ambiguity between bold and second-level lists, because of its construction:
It parses the text in two passes, using two regular expressions. The first regular expression divides the text into block-level elements, deciding also of the block type. The decission is final and cannot be changed later. The second pass is performed for some blocks only and it handles the character-level markup like bold and italics and links.
Up until now every list item was considered a separate block-level element. Since the division was made using a single regular expression, and the lookbehind patterns are required to have fixed length, I couldn't find a way to implement the context-depended special case (where {{{**}}} at the beginning of the line is a list only, if there is a {{{*}}} at the beginning of the previous line).
No I'm trying a different approach: treat the whole list as a block element, and divide it into list items in an additional, intemediate pass. I thought that I can just require the list block to start with a single asterisk or hash, and treat everything else as normal paragraph -- then the bold would be properly handled in the second pass. But I was too optimistic. This is a properl list (according to the current Creole spec) even when it starts with multiple asterisks:
{{{
***first list item bold**
* second list item
** sublist
}}}
Now I'm buffled. How to recognize that a block of text is a list without parsing all the character-level markup inside it first?
-- RadomirDopieralski, 2007-02-05
Question: How is the following markup should be rendered?
{{{
# first list item
# second list item
**continued bold on the next line**
}}}
I think we should require nested list characters match like this (MediaWiki style):
{{{
* One
*# Two
*#* Three
}}}
then the first sample above can be easily resolved as bold continuation, which a user would more naturally be expecting, in my point of view.
Although this is not resolvable in this way:
{{{
* first list item
* second list item
**continued bold on the next line**
}}}
One more example:
{{{
# first list item
# second list item
* - what is this?
an asterisk in continuation of second list item,
a third list item,
or first item of a new list?
}}}
This can only be resolved to literal asterisk if we require blank lines between adjacent but not connected list blocks. I don't think that it is necessary. I think this should rather be rendered as a first item of a new list. A single asterisk in the beginning of line should always be escaped - in list items as well as in paragraphs.
And one more:
{{{
* One
*# One.Two
*#* One.Two.Three
* Two
# One
#* One.Two
#*# One.Two.Three
}}}
I think here we have two not connected lists. Same as below:
{{{
* One
*# One.Two
*#* One.Two.Three
* Two
# One
#* One.Two
#*# One.Two.Three
}}}
What about this:
{{{
# One
#** Two bold
#*# Two.Three (with literal # in front)
}}}
Note: this wiki renders it with a bug (bold is not closed and goes up to my signature):
# One
#** Two bold
#*# Two.Three (with literal # in front)
Any comments?
-- YaroslavStavnichiy, 2007-12-17
Version Date Modified Size Author Changes ... Change note
43 17-Dec-2007 18:47 14.815 kB YaroslavStavnichiy to previous
42 26-Sep-2007 09:31 13.154 kB ChuckSmith to previous | to last restore
41 26-Sep-2007 01:04 13.184 kB 207.44.238.95 to previous | to last
« This page (revision-43) was last changed on 17-Dez-2007 18:47 by YaroslavStavnichiy