From 35a14cbfdc9fb65e046d22af02dbf95398284b5d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 21 Mar 2008 17:39:02 +0000 Subject: Wiki links: * fixes wiki links with pipe in table (closes #893, #870, #894) * prevent wiki link matching on multiple lines git-svn-id: http://redmine.rubyforge.org/svn/trunk@1280 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/redcloth.rb') diff --git a/lib/redcloth.rb b/lib/redcloth.rb index 14940cb88..9452c2670 100644 --- a/lib/redcloth.rb +++ b/lib/redcloth.rb @@ -510,7 +510,8 @@ class RedCloth < String ratts, row = pba( $1, 'tr' ), $2 if row =~ /^(#{A}#{C}\. )(.*)/m cells = [] - row.split( '|' ).each do |cell| + #row.split( /\(?!\[\[[^\]])|(?![^\[]\]\])/ ).each do |cell| + row.split( /\|(?![^\[\|]*\]\])/ ).each do |cell| ctyp = 'd' ctyp = 'h' if cell =~ /^_/ -- cgit v1.2.3