(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-16) was last changed on 21-Apr-2008 19:56 by OliverSiemoneit  

This page was created on 06-Sep-2006 16:46 by Radomir Dopieralski

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 3 changed one line
It is based on the [Creole0.1] draft.
It is based on the [Creole0.4] draft.
At line 5 changed 4 lines
There were several issues when writing it:
* The line breaks are a major pain. Currently I only add them inside paragraphs, and I included a special case that will not add a line break at the end of a paragraph if it is followed by an empty line. The line break is however added if the paragraph is followed by a list or a preformatted block, and I personally don't feel like adding more lookahead special cases.
* The expression for urls used is an approximation. In particular, commas,dots,exclamation marks and such are included in the url only when not followed by a space, so that you can write {{{http://news.com/article/2006,09,06}}} as a link, but also {{{see those two pages: http://one.org, http://two.org}}}. Other special characters are included in the url, but escaped when appropriate.
* I'm a little bit generous when parsing mixed lists. This is valid:
There are several things not totally right:
* The expression for urls used is an approximation. In particular, commas, dots, exclamation marks and such are included in the url only when not followed by a space, so that you can write {{{http://news.com/article/2006,09,06}}} as a link, but also {{{see those two pages: http://one.org, http://two.org}}}. Other special characters are included in the url, but escaped when appropriate.
* no "smart" resolving of ambiguity between **bold** and lists
* {{{#pragmas}}} from the top of page are filtered out before the parser gets to them, so it's possible to have a numbered lists broken this way
* Pre blocks use hashbang notation for denoting code type (for syntax highlighting).
* The {{{<<placeholder>>}}} syntax is used for macros,
* The {{{{{image}} }}} syntax is used for attachments.
At line 10 changed 36 lines
{{{
# One
- Two
- Three
# Four
}}}
and gets rendered as:
# One
# Two
# Three
# Four
How should be such and similar errors handled?
----
I would say that should be rendered as:
# One
* Two
* Three
# Four
--[ChuckSmith]
That was the previous result, but it could be abused to get two-level lists by users. The current one is just a kind of trying to fit it, without giving the users additional functionality (which they would instantly abuse, making the pages incompatible with other creole wikis). In the end I will just introduce and additional class for 'error', and will render all such things as 'errors', which then can be rendered with css into something really ugly ;). -- [RadomirDopieralski], 2006-09-06
I know you're joking, but one of the main principles of wikis is that they can render things "wrong", but never as an error. Users will simply see that what they typed didn't come out they way they wanted and try again. --[ChuckSmith], 2006-09-06
I'm not joking. If every combination is supposed to be rendered **somehow**, then WikiCreole has a much harder task than anticipated.
-- [RadomirDopieralski], 2006-09-06
Ok, I returned to the previous behavior, as suggested here. Now I'm working on making the list starting with more than 1st-level item somewhat sane. The change forth and back made my code shorter for about 20 lines, so I'm happy anyways ;).
-- [RadomirDopieralski], 2006-09-06
I'm also thinking about writing a mixed-mode parser, but this can be pretty weird.
Version Date Modified Size Author Changes ... Change note
16 21-Apr-2008 19:56 0.677 kB OliverSiemoneit to previous restore
15 21-Apr-2008 13:53 0.682 kB 141.187.34.4 to previous | to last
14 21-Mar-2008 00:15 0.677 kB 84.58.5.113 to previous | to last typo fixed
13 04-Nov-2007 01:56 0.676 kB RadomirDopieralski to previous | to last changes in 1.6
12 23-Mar-2007 09:24 1.289 kB RadomirDopieralski to previous | to last update
11 10-Feb-2007 18:58 1.154 kB RadomirDopieralski to previous | to last fully compliant with Creole 0.4
10 04-Feb-2007 21:18 1.2 kB RadomirDopieralski to previous | to last new version
9 04-Feb-2007 21:13 1.125 kB RadomirDopieralski to previous | to last new version
8 07-Sep-2006 00:42 2.526 kB 85.221.141.46 to previous | to last sanitizing lists
7 06-Sep-2006 23:06 2.245 kB 85.221.141.46 to previous | to last no jokes
6 06-Sep-2006 23:01 2.071 kB Chuck Smith to previous | to last no errors :)
5 06-Sep-2006 22:13 1.819 kB 85.221.141.46 to previous | to last in the face of ambiguity, refuse the temptation to guess
4 06-Sep-2006 21:40 1.322 kB Chuck Smith to previous | to last my rendering suggestion
3 06-Sep-2006 20:25 1.22 kB Radomir Dopieralski to previous | to last any suggestions on how to handle syntax errors?
2 06-Sep-2006 19:31 1.17 kB 85.221.141.46 to previous | to last new version, some changes
1 06-Sep-2006 16:46 1.02 kB Radomir Dopieralski to last
« This page (revision-16) was last changed on 21-Apr-2008 19:56 by OliverSiemoneit