Defect #31695 » fix_for_links_without_href.patch
| lib/redmine/wiki_formatting/markdown/html_parser.rb | ||
|---|---|---|
|
'h6' => {:pre => "\n\n###### ", :post => "\n\n"},
|
||
|
'th' => {:pre => '*', :post => "*\n"},
|
||
|
'td' => {:pre => '', :post => "\n"},
|
||
|
'a' => lambda {|node| node.content.present? ? %| [#{node.content}](#{node.attributes['href'].value}) | : %| #{node.attributes['href'].value} |}
|
||
|
'a' => lambda do |node|
|
||
|
if node.content.present? && node.attributes.key?('href')
|
||
|
%| [#{node.content}](#{node.attributes['href'].value}) |
|
||
|
elsif node.attributes.key?('href')
|
||
|
%| #{node.attributes['href'].value} |
|
||
|
else
|
||
|
%| #{node.content} |
|
||
|
end
|
||
|
end
|
||
|
)
|
||
|
end
|
||
|
end
|
||
| lib/redmine/wiki_formatting/textile/html_parser.rb | ||
|---|---|---|
|
'h6' => {:pre => "\n\nh6. ", :post => "\n\n"},
|
||
|
'th' => {:pre => '*', :post => "*\n"},
|
||
|
'td' => {:pre => '', :post => "\n"},
|
||
|
'a' => lambda {|node| node.content.present? ? %| "#{node.content}":#{node.attributes['href'].value} | : %| #{node.attributes['href'].value} |}
|
||
|
'a' => lambda do |node|
|
||
|
if node.content.present? && node.attributes.key?('href')
|
||
|
%| "#{node.content}":#{node.attributes['href'].value} |
|
||
|
elsif node.attributes.key?('href')
|
||
|
%| #{node.attributes['href'].value} |
|
||
|
else
|
||
|
%| #{node.content} |
|
||
|
end
|
||
|
end
|
||
|
)
|
||
|
end
|
||
|
end
|
||
- « Previous
- 1
- 2
- 3
- Next »