Module: RedmineRemotes::Esosti
- Defined in:
- lib/redmine_remotes/esosti.rb,
lib/redmine_remotes/esosti/instance.rb,
lib/redmine_remotes/esosti/entities/issue.rb
Defined Under Namespace
Modules: Entities Classes: Instance
Constant Summary collapse
- RICH_TEXT_COMMENT =
/<!--\s*RICH\s+TEXT\s-->/i.freeze
Class Method Summary collapse
Class Method Details
.remote_text_to_local(remote_text) ⇒ Object
8 9 10 11 12 |
# File 'lib/redmine_remotes/esosti.rb', line 8 def remote_text_to_local(remote_text) ::Redmine::WikiFormatting.html_parser.to_text( remote_text.gsub(RICH_TEXT_COMMENT, '').each_line.map(&:strip).join(" \n") ).each_line.map(&:strip).join("\n").gsub(/\n+/, "\n") end |