summaryrefslogtreecommitdiffstats
path: root/lib/redcloth3.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-07-19 14:23:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-07-19 14:23:15 +0000
commitdcba9f18e6f3a19af85bb66843eb97107805bb75 (patch)
tree4c0dcb8d7a46ee17dfe4b28a820f46eb37a18eca /lib/redcloth3.rb
parent5ec4d4cdab31509ff7afa5a9415850885885a6c4 (diff)
downloadredmine-dcba9f18e6f3a19af85bb66843eb97107805bb75.tar.gz
redmine-dcba9f18e6f3a19af85bb66843eb97107805bb75.zip
Allow line breaks in wiki table cells (#2346).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2824 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redcloth3.rb')
-rw-r--r--lib/redcloth3.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb
index a4d33f804..e99ccdf77 100644
--- a/lib/redcloth3.rb
+++ b/lib/redcloth3.rb
@@ -784,6 +784,7 @@ class RedCloth3 < String
end
LINK_RE = /
+ (
([\s\[{(]|[#{PUNCT}])? # $pre
" # start
(#{C}) # $atts
@@ -797,13 +798,16 @@ class RedCloth3 < String
)
(\/)? # $slash
([^\w\=\/;\(\)]*?) # $post
+ )
(?=<|\s|$)
/x
#"
def inline_textile_link( text )
text.gsub!( LINK_RE ) do |m|
- pre,atts,text,title,url,proto,slash,post = $~[1..8]
-
+ all,pre,atts,text,title,url,proto,slash,post = $~[1..9]
+ if text.include?('<br />')
+ all
+ else
url, url_title = check_refs( url )
title ||= url_title
@@ -821,6 +825,7 @@ class RedCloth3 < String
external = (url =~ /^https?:\/\//) ? ' class="external"' : ''
"#{ pre }<a#{ atts }#{ external }>#{ text }</a>#{ post }"
+ end
end
end