Feature #37119

Drop redcarpet dependency for common_mark formatter

Added by Marius BALTEANU 9 months ago. Updated 8 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:


Category:Code cleanup/refactoring
Target version:5.1.0


Redmine fails to start when it's installed without markdown group (#36892).

We should fix this and drop the redcarpet dependency for common_mark.

0002-Drop-redcarpet-dependency-from-common_mark-group.patch Magnifier (874 Bytes) Marius BALTEANU, 2022-05-18 00:12

0001-Move-methods-related-to-section-to-a-helper-file-and.patch Magnifier (6.75 KB) Marius BALTEANU, 2022-05-18 00:12

Associated revisions

Revision 21643
Added by Marius BALTEANU 8 months ago

Move methods related to wiki section to a helper file and include it in all 3 formatters (#37119).

Revision 21644
Added by Marius BALTEANU 8 months ago

Drop redcarpet dependency from common_mark group (#37119).

Revision 21654
Added by Marius BALTEANU 8 months ago

Fix rubocop warnings (#37119).

Revision 21683
Added by Marius BALTEANU 7 months ago

Add frozen_string_literal and copyright (#37119).


#1 Updated by Marius BALTEANU 9 months ago

  • Assignee set to Marius BALTEANU

#2 Updated by Marius BALTEANU 9 months ago

@Holger, I made a patch that should fix this.

What I did?
  • I've moved the methods get_section, update_section and extract_sections to a new helper file (Redmine::WikiFormatting::SectionHelper)
  • the new helper file is included by all three formatters
  • textile formatter overrides extract_sections method which his own implementation
  • I've removed the redcarpet dependency from common_mark group.

What do you think?

#3 Updated by Holger Just 8 months ago

Looks good to me, tanks!

#4 Updated by Marius BALTEANU 8 months ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Thanks Holger for your review. I've committed both changes.

Also available in: Atom PDF