diff --git a/modules/wiky.js b/modules/wiky.js
index 95645ea..ba2a110 100755
--- a/modules/wiky.js
+++ b/modules/wiky.js
@@ -1,691 +1,692 @@
cense: http://creativecommons.org/licenses/LGPL/2.1/
- Author: Stefan Goessner/2005-06
- Web: http://goessner.net/
+ Author: Stefan Goessner/2005-06
+ Web: http://goessner.net/
*/
+
var Wiky = {
version: 0.95,
blocks: null,
rules: {
all: [
"Wiky.rules.pre",
"Wiky.rules.nonwikiblocks",
"Wiky.rules.wikiblocks",
"Wiky.rules.post",
],
pre: [{
rex: /(\r?\n)/g,
tmplt: "\xB6"
}, // replace line breaks with '�' ..
],
post: [{
rex: /(^\xB6)|(\xB6$)/g,
tmplt: ""
}, // .. remove linebreaks at BOS and EOS ..
{
rex: /@([0-9]+)@/g,
tmplt: function($0, $1) {
return Wiky.restore($1);
}
}, // resolve blocks ..
{
rex: /\xB6/g,
tmplt: "\n"
} // replace '�' with line breaks ..
],
nonwikiblocks: [{
rex: /\\([%])/g,
tmplt: function($0, $1) {
return Wiky.store($1);
}
}, {
rex: /\[(?:\{([^}]*)\})?(?:\(([^)]*)\))?%(.*?)%\]/g,
tmplt: function($0, $1, $2, $3) {
return ":p]" + Wiky.store("
" + Wiky.apply($3, $2 ? Wiky.rules.lang[Wiky.attr($2)] : Wiky.rules.code) + "
") + "[p:";
}
} //programm code block
],
wikiblocks: [
"Wiky.rules.nonwikiinlines",
"Wiky.rules.escapes", {
rex: /(?:^|\xB6)(={1,6})(.*?)[=]*(?=\xB6|$)/g,
tmplt: function($0, $1, $2) {
var h = $1.length;
return ":p]\xB6" + $2 + "\xB6[p:";
}
}, // ..
{
rex: /(?:^|\xB6)[-]{4}(?:\xB6|$)/g,
tmplt: "\xB6
\xB6"
}, // horizontal ruler ..
{
rex: /\\\\([ \xB6])/g,
tmplt: "
$1"
}, // forced line break ..
{
rex: /(^|\xB6)([*01aAiIg]*[\.*])[ ]/g,
tmplt: function($0, $1, $2) {
var state = $2.replace(/([*])/g, "u").replace(/([\.])/, "");
return ":" + state + "]" + $1 + "[" + state + ":";
}
}, {
rex: /(?:^|\xB6);[ ](.*?):[ ]/g,
tmplt: "\xB6:l][l:$1:d][d:"
}, // ; term : definition
{
rex: /\[(?:\{([^}]*)\})?(?:\(([^)]*)\))?\"/g,
tmplt: function($0, $1, $2) {
return ":p][p:";
}
}, // block quotation start
{
rex: /\"\]/g,
tmplt: ":p]
[p:"
}, // block quotation end
{
rex: /\[(\{[^}]*\})?\|/g,
tmplt: ":t]$1[r:"
}, // .. start table ..
{
rex: /\|\]/g,
tmplt: ":r][t:"
}, // .. end table ..
{
rex: /\|\xB6[ ]?\|/g,
tmplt: ":r]\xB6[r:"
}, // .. end/start table row ..
{
rex: /\|/g,
tmplt: ":c][c:"
}, // .. end/start table cell ..
{
rex: /^(.*)$/g,
tmplt: "[p:$1:p]"
}, // start paragraph '[p:' at BOS .. end paragraph ':p]' at EOS ..
{
rex: /(([\xB6])([ \t\f\v\xB6]*?)){2,}/g,
tmplt: ":p]$1[p:"
}, // .. separate paragraphs at blank lines ..
{
rex: /\[([01AIacdgilprtu]+)[:](.*?)[:]([01AIacdgilprtu]+)\]/g,
tmplt: function($0, $1, $2, $3) {
return Wiky.sectionRule($1 == undefined ? "" : $1, "", Wiky.apply($2, Wiky.rules.wikiinlines), !$3 ? "" : $3);
}
}, {
rex: /\[[01AIacdgilprtu]+[:]|[:][01AIacdgilprtu]+\]/g,
tmplt: ""
}, // .. remove singular section delimiters (they frequently exist with incomplete documents while typing) ..
{
rex: /(?:([0-9]*)[>])?([ ]?)(.*?)([ ]?)<\/td>/g,
tmplt: function($0, $1, $2, $3, $4) {
return " | " + $2 + $3 + $4 + " | ";
}
}, {
rex: /<(p|table)>(?:\xB6)?(?:\{(.*?)\})/g,
tmplt: function($0, $1, $2) {
return "<" + $1 + Wiky.style($2) + ">";
}
}, {
rex: /
([ \t\f\v\xB6]*?)<\/p>/g,
tmplt: "$1"
}, // .. remove empty paragraphs ..
"Wiky.rules.shortcuts"
],
nonwikiinlines: [{
rex: /%(?:\{([^}]*)\})?(?:\(([^)]*)\))?(.*?)%/g,
tmplt: function($0, $1, $2, $3) {
return Wiky.store("" + Wiky.apply($3, $2 ? Wiky.rules.lang[Wiky.attr($2)] : Wiky.rules.code) + "
");
}
}, // inline code
{
rex: /%(.*?)%/g,
tmplt: function($0, $1) {
return Wiky.store("" + Wiky.apply($2, Wiky.rules.code) + "
");
}
}
],
wikiinlines: [{
rex: /