e8be4b0b6d
* Basic skeleton for creole reader. No real functionality besides preliminary bold and italics yet. * Creole: add support for bold/italic with implicit end at paragraph end. * Creole: add support for headings. * Creole: add support for tilde escaped chars. * Basic skeleton for creole reader. No real functionality besides preliminary bold and italics yet. * Creole: add support for bold/italic with implicit end at paragraph end. * Creole: add support for headings. * Creole: add support for tilde escaped chars. * Add a test suite for the creole parser So far this covers only things the parser already supports. * Added simple parsing of flat unordered lists. * Added tests for unordered lists in creole. * First, wrong(!) implementation of sublists. Fails test, as sublists should not be embedded in a list item! * Implementation of unordered sublists. * Added support for ordered lists to creole reader. * Added utility function to append parsers to Creole reader. * Creole reader: Fixed list item end detection in sub lists. * Tests for creole reader: added more tests for lists. Covering ordered and unordered tests, even mixed. Tests for formatting in list items still missing... * Added "nowiki" blocks. One exception rule is missing... * Creole reader: nowiki: implemented exception for curly brackets. * Creole reader: added inline nowiki. * Creole reader: added horizontalRule. * Creole reader: added auto linking of URIs. * Creole reader: detect horizontalRule as para end. Used the opportunity for a little refactoring. * Creole reader: added forced line breaks. Including test. * Creole reader: implement wiki links. * Creole reader: added image support. * Creole reader: support images as links. * Creole reader: implemented placeholder -- by simply dropping them. * Creole reader: added tests for links. After observing a regression, it was really time... ;-) * Creole reader: fixed links with names. * Creole reader: allow space after first of enclosing tags. Space after the start of formatting tags are allowed with creole, e.g. "there is // italic text // in here" is legal. This problem was discovered using the creole1.0test.txt document from http://www.wikicreole.org/wiki/Creole1.0TestCases See l.57: # // italic item 3 // * Creole reader: fixed links without names. * Creole reader: Tests, sorted into groups. * Creole reader: implemented tables. * Removed redundant import. * Creole reader: add correct escaping of links. * Creole reader: allow handling of e.g. links in parenthesis and quotes. * Creole reader: Modified disclaimer as most of the code is actually by me. * Creole reader: Tests: added escaped links. * Creole reader: preserve leading and trailing space in bold/italic. * Creole reader: detect tables without a leading blank line. * Creole Reader: added official creole1.0test.txt as "old" test. The base document was downloaded from http://www.wikicreole.org/wiki/Creole1.0TestCases. The Wiki, and therefore the test document is Copyright (C) by the contributors. Some rights reserved, license CC BY-SA. http://creativecommons.org/licenses/by-sa/1.0/
137 lines
3.3 KiB
Text
137 lines
3.3 KiB
Text
= Top-level heading (1)
|
|
== This a test for creole 0.1 (2)
|
|
=== This is a Subheading (3)
|
|
==== Subsub (4)
|
|
===== Subsubsub (5)
|
|
|
|
The ending equal signs should not be displayed:
|
|
|
|
= Top-level heading (1) =
|
|
== This a test for creole 0.1 (2) ==
|
|
=== This is a Subheading (3) ===
|
|
==== Subsub (4) ====
|
|
===== Subsubsub (5) =====
|
|
|
|
|
|
You can make things **bold** or //italic// or **//both//** or //**both**//.
|
|
|
|
Character formatting extends across line breaks: **bold,
|
|
this is still bold. This line deliberately does not end in star-star.
|
|
|
|
Not bold. Character formatting does not cross paragraph boundaries.
|
|
|
|
You can use [[internal links]] or [[http://www.wikicreole.org|external links]],
|
|
give the link a [[internal links|different]] name.
|
|
|
|
Here's another sentence: This wisdom is taken from [[Ward Cunningham's]]
|
|
[[http://www.c2.com/doc/wikisym/WikiSym2006.pdf|Presentation at the Wikisym 06]].
|
|
|
|
Here's a external link without a description: [[http://www.wikicreole.org]]
|
|
|
|
Be careful that italic links are rendered properly: //[[http://my.book.example/|My Book Title]]//
|
|
|
|
Free links without braces should be rendered as well, like http://www.wikicreole.org/ and http://www.wikicreole.org/users/~example.
|
|
|
|
Creole1.0 specifies that http://bar and ftp://bar should not render italic,
|
|
something like foo://bar should render as italic.
|
|
|
|
You can use this to draw a line to separate the page:
|
|
----
|
|
|
|
You can use lists, start it at the first column for now, please...
|
|
|
|
unnumbered lists are like
|
|
* item a
|
|
* item b
|
|
* **bold item c**
|
|
|
|
blank space is also permitted before lists like:
|
|
* item a
|
|
* item b
|
|
* item c
|
|
** item c.a
|
|
|
|
or you can number them
|
|
# [[item 1]]
|
|
# item 2
|
|
# // italic item 3 //
|
|
## item 3.1
|
|
## item 3.2
|
|
|
|
up to five levels
|
|
* 1
|
|
** 2
|
|
*** 3
|
|
**** 4
|
|
***** 5
|
|
|
|
* You can have
|
|
multiline list items
|
|
* this is a second multiline
|
|
list item
|
|
|
|
You can use nowiki syntax if you would like do stuff like this:
|
|
|
|
{{{
|
|
Guitar Chord C:
|
|
|
|
||---|---|---|
|
|
||-0-|---|---|
|
|
||---|---|---|
|
|
||---|-0-|---|
|
|
||---|---|-0-|
|
|
||---|---|---|
|
|
}}}
|
|
|
|
You can also use it inline nowiki {{{ in a sentence }}} like this.
|
|
|
|
= Escapes =
|
|
Normal Link: http://wikicreole.org/ - now same link, but escaped: ~http://wikicreole.org/
|
|
|
|
Normal asterisks: ~**not bold~**
|
|
|
|
a tilde alone: ~
|
|
|
|
a tilde escapes itself: ~~xxx
|
|
|
|
=== Creole 0.2 ===
|
|
|
|
This should be a flower with the ALT text "this is a flower" if your wiki supports ALT text on images:
|
|
|
|
{{Red-Flower.jpg|here is a red flower}}
|
|
|
|
=== Creole 0.4 ===
|
|
|
|
Tables are done like this:
|
|
|
|
|=header col1|=header col2|
|
|
|col1|col2|
|
|
|you |can |
|
|
|also |align\\ it. |
|
|
|
|
You can format an address by simply forcing linebreaks:
|
|
|
|
My contact dates:\\
|
|
Pone: xyz\\
|
|
Fax: +45\\
|
|
Mobile: abc
|
|
|
|
=== Creole 0.5 ===
|
|
|
|
|= Header title |= Another header title |
|
|
| {{{ //not italic text// }}} | {{{ **not bold text** }}} |
|
|
| //italic text// | ** bold text ** |
|
|
|
|
=== Creole 1.0 ===
|
|
|
|
If interwiki links are setup in your wiki, this links to the WikiCreole page about Creole 1.0 test cases: [[WikiCreole:Creole1.0TestCases]].
|
|
|
|
----
|
|
|
|
The above test document was found on
|
|
http://www.wikicreole.org/wiki/Creole1.0TestCases and downloaded from
|
|
http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt.
|
|
|
|
The Creole Wiki is licensed: Copyright (C) by the contributors. Some
|
|
rights reserved, license
|
|
[[BY-SA|https://creativecommons.org/licenses/by-sa/1.0/]].
|