Defect #16669

Markdown formatter should use the :no_intra_emphasis extension

Added by Sam Rawlins over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Text formatting
Target version:2.5.2
Resolution:Fixed Affected version:2.5.1

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

Associated revisions

Revision 13105
Added by Jean-Philippe Lang about 4 years ago

Set Redcarpet :no_intra_emphasis to true (#16669).

History

#1 Updated by Jean-Philippe Lang over 4 years ago

  • Target version set to 2.5.2

#2 Updated by Jean-Philippe Lang about 4 years ago

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

Fixed in r13105.

#3 Updated by Jean-Philippe Lang about 4 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF