https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292015-09-26T03:54:07ZRedmineRedmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=662102015-09-26T03:54:07ZGo MAEDA
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/1151">Feature #1151</a>: Open Links in New-Window</i> added</li></ul> Redmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=862102018-07-15T02:42:05ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>The following patch fixes this issue.</p>
<pre><code class="diff syntaxhl"><span class="gh">Index: lib/redmine/wiki_formatting/markdown/formatter.rb
===================================================================
</span><span class="gd">--- lib/redmine/wiki_formatting/markdown/formatter.rb (revision 17445)
</span><span class="gi">+++ lib/redmine/wiki_formatting/markdown/formatter.rb (working copy)
</span><span class="p">@@ -123,7 +123,8 @@</span>
@@formatter ||= Redcarpet::Markdown.new(
Redmine::WikiFormatting::Markdown::HTML.new(
:filter_html => true,
<span class="gd">- :hard_wrap => true
</span><span class="gi">+ :hard_wrap => true,
+ :link_attributes => {:class => 'external'}
</span> ),
:autolink => true,
:fenced_code_blocks => true,
</code></pre> Redmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=862112018-07-15T05:05:24ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>No "external" class when bare url is used in Markdown formatter</i> to <i>Bare URLs in Markdown don't have "external" class</i></li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>The following patch fixes this issue.</p>
</blockquote>
<p>Unfortunately, it breaks some tests.</p>
<pre>
Failure:
ApplicationHelperTest#test_attachment_links_to_images_with_email_format_should_not_be_parsed [test/helpers/application_helper_test.rb:709]:
Expected /<p><a class="attachment" href="\/attachments\/75">image@2x.png<\/a> should not be parsed in image@2x.png<\/p>/ to match "<p><a class=\"attachment\" href=\"/attachments/75\">image@2x.png</a>\" class=\"external should not be parsed in <a href=\"mailto:image@2x.png\" class=\"external\">image@2x.png</a></p>\n".
bin/rails test test/helpers/application_helper_test.rb:698
.................................F
Failure:
ApplicationHelperTest#test_user_links_with_email_as_login_name_should_not_be_parsed_markdown [test/helpers/application_helper_test.rb:430]:
Expected /<p><a class=\"user active\".*>Bob Doe<\/a> should not be parsed in <a href=\"mailto:jsmith@somenet.foo\">jsmith@somenet.foo<\/a><\/p>/ to match "<p><a class=\"user active\" href=\"/users/14\">Bob Doe</a>\" class=\"external should not be parsed in <a href=\"mailto:jsmith@somenet.foo\" class=\"external\">jsmith@somenet.foo</a></p>\n".
bin/rails test test/helpers/application_helper_test.rb:424
</pre> Redmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=862122018-07-15T05:09:53ZGo MAEDA
<ul><li><strong>Target version</strong> deleted (<del><i>Candidate for next minor release</i></del>)</li></ul> Redmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=947912019-11-06T10:12:55ZJan from Planio www.plan.io
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/32424">Feature #32424</a>: CommonMark Markdown Text Formatting</i> added</li></ul> Redmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=1036892021-08-12T07:22:49ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Wont fix</i></li></ul><p>The CommonMark formatter that will be available in Redmine 5.0.0 (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: CommonMark Markdown Text Formatting (Closed)" href="https://www.redmine.org/issues/32424">#32424</a>) correctly adds an "external" class. The existing RedCarpet based Markdown formatter still has this bug, but I don't think we need to make any effort to fix it because it is going to be dropped in the near future.</p> Redmine - Defect #20841: Bare URLs in Markdown don't have "external" classhttps://www.redmine.org/issues/20841?journal_id=1106582023-08-31T08:38:12ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/39003">Feature #39003</a>: Add css class to external links in markdown</i> added</li></ul>