Merged r2168 to r2171 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2172 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+9
-6
@@ -408,7 +408,7 @@ class RedCloth3 < String
|
||||
# [ /"(?=[#{PUNCT_Q}]*[\s#{PUNCT_NOQ}])/, '”' ], # double closing
|
||||
# [ /"/, '“' ], # double opening
|
||||
# [ /\b( )?\.{3}/, '\1…' ], # ellipsis
|
||||
[ /\b([A-Z][A-Z0-9]{2,})\b(?:[(]([^)]*)[)])/, '<acronym title="\2">\1</acronym>' ], # 3+ uppercase acronym
|
||||
# [ /\b([A-Z][A-Z0-9]{2,})\b(?:[(]([^)]*)[)])/, '<acronym title="\2">\1</acronym>' ], # 3+ uppercase acronym
|
||||
# [ /(^|[^"][>\s])([A-Z][A-Z0-9 ]+[A-Z0-9])([^<A-Za-z0-9]|$)/, '\1<span class="caps">\2</span>\3', :no_span_caps ], # 3+ uppercase caps
|
||||
# [ /(\.\s)?\s?--\s?/, '\1—' ], # em dash
|
||||
# [ /\s->\s/, ' → ' ], # right arrow
|
||||
@@ -448,9 +448,12 @@ class RedCloth3 < String
|
||||
|
||||
# Search and replace for Textile glyphs (quotes, dashes, other symbols)
|
||||
def pgl( text )
|
||||
GLYPHS.each do |re, resub, tog|
|
||||
next if tog and method( tog ).call
|
||||
text.gsub! re, resub
|
||||
#GLYPHS.each do |re, resub, tog|
|
||||
# next if tog and method( tog ).call
|
||||
# text.gsub! re, resub
|
||||
#end
|
||||
text.gsub!(/\b([A-Z][A-Z0-9]{2,})\b(?:[(]([^)]*)[)])/) do |m|
|
||||
"<acronym title=\"#{htmlesc $2}\">#{$1}</acronym>"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -467,7 +470,7 @@ class RedCloth3 < String
|
||||
style << "vertical-align:#{ v_align( $& ) };" if text =~ A_VLGN
|
||||
end
|
||||
|
||||
style << "#{ $1 };" if not filter_styles and
|
||||
style << "#{ htmlesc $1 };" if not filter_styles and
|
||||
text.sub!( /\{([^}]*)\}/, '' )
|
||||
|
||||
lang = $1 if
|
||||
@@ -810,7 +813,7 @@ class RedCloth3 < String
|
||||
end
|
||||
atts = pba( atts )
|
||||
atts = " href=\"#{ url }#{ slash }\"#{ atts }"
|
||||
atts << " title=\"#{ title }\"" if title
|
||||
atts << " title=\"#{ htmlesc title }\"" if title
|
||||
atts = shelve( atts ) if atts
|
||||
|
||||
external = (url =~ /^https?:\/\//) ? ' class="external"' : ''
|
||||
|
||||
Reference in New Issue
Block a user