summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/textile
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-08-11 05:01:37 +0000
committerGo MAEDA <maeda@farend.jp>2019-08-11 05:01:37 +0000
commitf5c7a4a4208c9c146544b4498de3a08761cbc55a (patch)
tree8612620b530885d8e69b3c122281312b35255e31 /lib/redmine/wiki_formatting/textile
parent3c91a3d5b2f9a2ce55b941ee68fbaa596b5b3052 (diff)
downloadredmine-f5c7a4a4208c9c146544b4498de3a08761cbc55a.tar.gz
redmine-f5c7a4a4208c9c146544b4498de3a08761cbc55a.zip
Convert HTML links to Textile/Markdown links when creating an issue from an email (#31695).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@18361 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting/textile')
-rw-r--r--lib/redmine/wiki_formatting/textile/html_parser.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/textile/html_parser.rb b/lib/redmine/wiki_formatting/textile/html_parser.rb
index 72890871e..7d9173478 100644
--- a/lib/redmine/wiki_formatting/textile/html_parser.rb
+++ b/lib/redmine/wiki_formatting/textile/html_parser.rb
@@ -34,7 +34,8 @@ module Redmine
'h3' => {:pre => "\n\nh3. ", :post => "\n\n"},
'h4' => {:pre => "\n\nh4. ", :post => "\n\n"},
'h5' => {:pre => "\n\nh5. ", :post => "\n\n"},
- 'h6' => {:pre => "\n\nh6. ", :post => "\n\n"}
+ 'h6' => {:pre => "\n\nh6. ", :post => "\n\n"},
+ 'a' => lambda {|node| node.content.present? ? %| "#{node.content}":#{node.attributes['href'].value} | : %| #{node.attributes['href'].value} |}
)
end
end