"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/redmine/wiki_formatting/textile/redcloth3.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

redcloth3.rb  (redmine-4.1.0):redcloth3.rb  (redmine-4.1.1)
skipping to change at line 841 skipping to change at line 841
all all
else else
url, url_title = check_refs(url) url, url_title = check_refs(url)
title ||= url_title title ||= url_title
# Idea below : an URL with unbalanced parethesis and # Idea below : an URL with unbalanced parethesis and
# ending by ')' is put into external parenthesis # ending by ')' is put into external parenthesis
if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0) if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0)
url = url[0..-2] # discard closing parenth from url url = url[0..-2] # discard closing parenth from url
post = ")" + post # add closing parenth to post post = ")" + post # add closing parenth to post
end end
url = htmlesc(url.dup)
next all if url.downcase.start_with?('javascript:')
atts = pba(atts) atts = pba(atts)
atts = +" href=\"#{htmlesc url}#{slash}\"#{atts}" atts = +" href=\"#{url}#{slash}\"#{atts}"
atts << " title=\"#{htmlesc title}\"" if title atts << " title=\"#{htmlesc title}\"" if title
atts = shelve(atts) if atts atts = shelve(atts) if atts
external = (url =~ /^https?:\/\//) ? ' class="external"' : '' external = (url =~ /^https?:\/\//) ? ' class="external"' : ''
"#{pre}<a#{atts}#{external}>#{text}</a>#{post}" "#{pre}<a#{atts}#{external}>#{text}</a>#{post}"
end end
end end
end end
MARKDOWN_REFLINK_RE = / MARKDOWN_REFLINK_RE = /
\[([^\[\]]+)\] # $text \[([^\[\]]+)\] # $text
skipping to change at line 961 skipping to change at line 965
atts = +" src=\"#{htmlesc url.dup}\"#{atts}" atts = +" src=\"#{htmlesc url.dup}\"#{atts}"
atts << " title=\"#{title}\"" if title atts << " title=\"#{title}\"" if title
atts << " alt=\"#{title}\"" atts << " alt=\"#{title}\""
# size = @getimagesize($url); # size = @getimagesize($url);
# if($size) $atts.= " $size[3]"; # if($size) $atts.= " $size[3]";
href, alt_title = check_refs( href ) if href href, alt_title = check_refs( href ) if href
url, url_title = check_refs( url ) url, url_title = check_refs( url )
next m unless uri_with_safe_scheme?(url) next m unless uri_with_safe_scheme?(url)
if href
href = htmlesc(href.dup)
next m if href.downcase.start_with?('javascript:')
end
out = +'' out = +''
out << "<a#{shelve(" href=\"#{href}\"")}>" if href out << "<a#{shelve(" href=\"#{href}\"")}>" if href
out << "<img#{shelve(atts)} />" out << "<img#{shelve(atts)} />"
out << "</a>#{href_a1}#{href_a2}" if href out << "</a>#{href_a1}#{href_a2}" if href
if algn if algn
algn = h_align( algn ) algn = h_align( algn )
if stln == "<p>" if stln == "<p>"
out = "<p style=\"float:#{algn}\">#{out}" out = "<p style=\"float:#{algn}\">#{out}"
skipping to change at line 1023 skipping to change at line 1031
text.gsub!( /^ +$/, '' ) text.gsub!( /^ +$/, '' )
text.gsub!( /\n{3,}/, "\n\n" ) text.gsub!( /\n{3,}/, "\n\n" )
text.gsub!( /"$/, "\" " ) text.gsub!( /"$/, "\" " )
# if entire document is indented, flush # if entire document is indented, flush
# to the left side # to the left side
flush_left text flush_left text
end end
def flush_left( text ) def flush_left( text )
indt = 0 if /(?![\r\n\t ])[[:cntrl:]]/.match?(text)
if text =~ /^ / text.gsub!(/(?![\r\n\t ])[[:cntrl:]]/, '')
unless text.empty? end
indt += 1 while text !~ /^ {#{indt}}[^ ]/ if /^ +\S/.match?(text)
end indt = 0
indt += 1 until /^ {#{indt}}\S/.match?(text)
if indt.nonzero? if indt.nonzero?
text.gsub!( /^ {#{indt}}/, '' ) text.gsub!( /^ {#{indt}}/, '' )
end end
end end
end end
def footnote_ref( text ) def footnote_ref( text )
text.gsub!(/\b\[([0-9]+?)\](\s)?/, text.gsub!(/\b\[([0-9]+?)\](\s)?/,
'<sup><a href="#fn\1">\1</a></sup>\2') '<sup><a href="#fn\1">\1</a></sup>\2')
end end
 End of changes. 4 change blocks. 
6 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)