Project

General

Profile

Actions

Defect #16669

closed

Markdown formatter should use the :no_intra_emphasis extension

Added by Sam Rawlins about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I'm so excited to see Redmine supporting markdown with Redcarpet (#15520)! However, this is causing a lot of unintended emphasis rendering, e.g. at ruby-lang.org [1]. I think the `:no_intra_emphasis` extension should be enabled when creating the Redcarpet::Markdown formatter. From the Redcarpet docs [2]:

`:no_intra_emphasis:` do not parse emphasis inside of words.
Strings such as `foo_bar_baz` will not generate `<em>` tags.

The fix is just to add `:no_intra_emphasis => true` to [Redmine::WikiFormatting::Markdown::Formatter#formatter](http://www.redmine.org/projects/redmine/repository/entry/trunk/lib/redmine/wiki_formatting/markdown/formatter.rb#L125)

[1] https://bugs.ruby-lang.org/issues/9726, https://bugs.ruby-lang.org/issues/9724, https://bugs.ruby-lang.org/issues/9719, https://bugs.ruby-lang.org/issues/9683, https://bugs.ruby-lang.org/issues/9679 are just the 5 most recent.
[2] https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use

Actions #1

Updated by Jean-Philippe Lang about 10 years ago

  • Target version set to 2.5.2
Actions #2

Updated by Jean-Philippe Lang almost 10 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r13105.

Actions #3

Updated by Jean-Philippe Lang almost 10 years ago

  • Status changed from Resolved to Closed

Merged.

Actions

Also available in: Atom PDF