diff --git a/addons/wiki/static/src/lib/wiky/wiky.js b/addons/wiki/static/src/lib/wiky/wiky.js index 5bc9c6f167d..f4d3fd3c89d 100755 --- a/addons/wiki/static/src/lib/wiky/wiky.js +++ b/addons/wiki/static/src/lib/wiky/wiky.js @@ -11,17 +11,20 @@ wiky.process = function(wikitext) { var lines = wikitext.split(/\r?\n/); var start; var html = ""; - for (var i=0;i"; + html += "

"+line.substring(3,line.length-3)+"

"; } else if (line.match(/^==/)!=null && line.match(/==$/)!=null) { - html += "

"+line.substring(2,line.length-2)+"

"; + html += "

"+line.substring(2,line.length-2)+"

"; + } + else if (line.match(/^=/)!=null && line.match(/=$/)!=null) + { + html += "

"+line.substring(1,line.length-1)+"

"; } else if (line.match(/^:+/)!=null) { @@ -54,6 +57,14 @@ wiky.process = function(wikitext) { html += wiky.process_bullet_point(lines,start,i); } + else if (line.match(/^img:/)!=null) + { + html += wiky.process_image(line.substring(4)); + } + else if (line.match(/^attach:/)!=null) + { + html += "Download the file" + } else { html += wiky.process_normal(line); @@ -61,7 +72,6 @@ wiky.process = function(wikitext) { html += "
\n"; } - return html; }; @@ -97,7 +107,6 @@ wiky.process_indent = function(lines,start,end) { wiky.process_bullet_point = function(lines,start,end) { var html = (lines[start].charAt(0)=='*')?"