lib/creole.rb in minad-creole-0.3.1 vs lib/creole.rb in minad-creole-0.3.2
- old
+ new
@@ -27,11 +27,11 @@
# You can customize the created anchor/image markup by overriding
# make_*_anchor/make_image.
module Creole
- VERSION = '0.3.1'
+ VERSION = '0.3.2'
# CreoleParseError is raised when the Creole parser encounters
# something unexpected. This is generally now thrown unless there is
# a bug in the parser.
class CreoleParseError < Exception; end
@@ -276,19 +276,19 @@
end
end
def parse_table_row(str)
@out << '<tr>'
- str.scan(/\s*\|(=)?\s*(([^|~]|~.)*)(?=\||$)/) {
+ str.scan(/\s*\|(=)?\s*((\[\[.*?\]\]|\{\{.*?\}\}|[^|~]|~.)*)(?=\||$)/) do
unless $2.empty? and $'.empty?
@out << ($1 ? '<th>' : '<td>')
parse_inline($2) if $2
until @stack.last == 'table'
@out << '</' << @stack.pop << '>'
end
@out << ($1 ? '</th>' : '</td>')
end
- }
+ end
@out << '</tr>'
end
def make_nowikiblock(input)
input.gsub(/^ (?=\}\}\})/, '')