lib/caramelize/wiki/wikka_converter.rb in caramelize-0.1.0 vs lib/caramelize/wiki/wikka_converter.rb in caramelize-0.1.1

- old
+ new

@@ -11,13 +11,19 @@ body.gsub!(/(\*\*)(.*?)(\*\*)/) {|s| '**' + $2 + '**' } #bold body.gsub!(/(\/\/)(.*?)(\/\/)/) {|s| '_' + $2 + '_' } #italic #str.gsub!(/(===)(.*?)(===)/) {|s| '`' + $2 + '`'} #code body.gsub!(/(__)(.*?)(__)/) {|s| '<u>' + $2 + '</u>'} #underline + body.gsub!(/(---)/, ' ') #forced linebreak - body.gsub!(/(.*?)(\n\t-)(.*?)/) {|s| $1 + '\n' + $3 } #list + #body.gsub!(/(.*?)(\n\t-)(.*?)/) {|s| $1 + $3 } #list - body.gsub!(/(\t-)(.*?)/) {|s| '*' + $2 } #list + body.gsub!(/(\t-)(.*)/, '*\2') # unordered list + body.gsub!(/(~-)(.*)/, '*\2') # unordered list + # TODO ordered lists + + # TODO images: ({{image)(url\=?)?(.*)(}}) + #str.gsub!(/(----)/) {|s| '~~~~'} #seperator body.gsub!(/(\[\[)(\w+)\s(.+?)(\]\])/, '[[\3|\2]]') #body.gsub!(/\[\[(\w+)\s(.+)\]\]/, ' [[\1 | \2]] ')