Project

General

Profile

Actions

Feature #6269

open

RedCloth 4 support

Added by Jean-Baptiste Barth over 13 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Adding support for Redcloth 4 would be nice since Redcloth 3.x is clearly outdated and has many bugs and limitations.

But we have to make some choices before integrating this :
  1. Redcloth 4.x needs native compiling, which could be problematic, especially for Windows users. What should we do :
    • try to find how we could make installation easier, and try to switch from redcloth3 to redcloth4
    • integrate redcloth4 support as an extra feature (like OpenID authentication: redmine behavior would depend on the presence of a system gem) ? Cons: duplicated testing / things to maintain
    • just add this as a "core plugin" ?
    • write our own (light) textile parser for the core and drop all this into plugins ?
  2. when ? which target version ?
  3. if we decide to stay on redcloth3, pros/cons ? is there something we can do to bypass actual limitations (use of light mode in activity summaries, hard_breaks related problems, handling of pre/code/@ sections,...)
  4. does anyone know good alternatives to redcloth ?

I leave a tiny patch which basically just let you boot a redmine trunk instance with your system's redcloth 4.2 gem. Basic formatting works but there are many broken tests. I can work on it, but I'd prefer we answer questions above before.


Files

basic_redcloth4_support.diff (1.75 KB) basic_redcloth4_support.diff Jean-Baptiste Barth, 2010-09-02 05:09

Related issues

Related to Redmine - Feature #10078: Definition List supportNew2012-01-27

Actions
Related to Redmine - Defect #8055: Links ending with curly brackets are not correctly interpretedNew2011-04-04

Actions
Related to Redmine - Defect #6376: Turning off textile inline with '==' doesn't work.Reopened2010-09-12

Actions
Related to Redmine - Feature #10889: Add support for the 'tel' URL protocol handlerNew

Actions
Related to Redmine - Defect #10758: Sub-/superscript w/o blank New

Actions
Related to Redmine - Defect #14038: Ordered/unordered lists inside table cell are mangledReopenedJean-Philippe Lang

Actions
Related to Redmine - Defect #16149: Textile within-word markup doesn't workNew

Actions
Related to Redmine - Defect #6796: Long Description Causes 100% CPU on WindowsClosed2010-11-02

Actions
Related to Redmine - Defect #20425: fn1. not working in ticketsClosed

Actions
Related to Redmine - Defect #29746: Unexpected results with enumeration formatting in TextileNew

Actions
Related to Redmine - Feature #20511: Comments for Textile text formattingClosedGo MAEDA

Actions
Has duplicate Redmine - Feature #6910: Update to new version of textileClosed2010-11-16

Actions
Blocks Redmine - Feature #2219: Export to LaTeX using Redcloth 4New2008-11-20

Actions
Blocks Redmine - Defect #7533: Inline image alt-text fails due to wiki syntaxNew2011-02-03

Actions
Actions #1

Updated by Mike Stupalov over 13 years ago

In my best option would be to leave redcloth3 (as light textile parser), and redcloth4 add as plug-in.

For Windows, can simply include precompiled gem?

does anyone know good alternatives to redcloth?

For textile format i know only 2 implementation: redcloth & http://textile.thresholdstate.com/

Actions #2

Updated by Frank Schwarz over 13 years ago

Windows uses can get precompiled RedCloth 4 this way:

gem install RedCloth --platform=x86-mswin32-60

I applied the basic_redcloth4_support.diff but unfortunately code highlighting stops to work then (https://redmine.buschmais.com/help/wiki_syntax_detailed.html#13)

Actions #3

Updated by Brett Patterson about 13 years ago

Both versions of RedCloth (3 and 4) suffer some sort of XSS vulnerability; however, there are work arounds which we could put in place to remove such attacks. It deals with the use of :filter_html and white_list to allow only the HTML that RedCloth/Textile generates.

Perhaps we can rework the implementation to actually utilize asane sanitization method and get back to using the full power of RedCloth instead of this disabled version.

References:
Actions #4

Updated by Etienne Massip about 13 years ago

There is a pure-ruby version since 4.2.0 but its use is discouraged by its author himself :

Excerpt from https://github.com/jgarber/redcloth/blob/master/CHANGELOG :

Added a pure-ruby version of the parser for times when you can't compile the C or Java extensions.  You should avoid using it if at all possible because it is 32 times slower (and has some other problems, too)! [Jason Garber]
Actions #5

Updated by Ling Li almost 13 years ago

It seems that the support for definition list (DL) was added between RedCloth 3.x and 4.x, together with a bunch other improvements. I hope Redmine can add RedCloth 4 support in the next release.

Actions #6

Updated by Alexander Oryol almost 12 years ago

RedCloth 4 is very desired feature.
up!

Actions #7

Updated by Aidin Abedi over 11 years ago

+1

Actions #8

Updated by Adam Clark about 11 years ago

Adding another upvote -- in addition to the new features, RedCloth 4 also has a detailed reference manual (http://redcloth.org/textile/). Having spent many hours trying to figure out (and document for my users) which Textile features Redmine supports, I would really appreciate being able to point to something like this.

Actions #9

Updated by Etienne Massip about 11 years ago

I'm personally waiting for https://github.com/jgarber/redcloth-parslet because switching to RC4 would bring some important performance drop.

Upgrading would be a challenge whichever RC version we would upgrade to because of the current mix between original and Redmine specific code.

Actions #10

Updated by Jean-Baptiste Barth about 11 years ago

Hooking in RedCloth4 is also challenging. I should have updated the issue before, but Redmine specific code to handle shortcuts (issues, commit, docs, etc.), "toc", "include" or macros isn't as easy to integrate in the native version.

Adam Ross Clark: sure RedCloth doc is pretty complete, but Redmine one is accessible and should do the trick for 99% users. See "?" button in every area, which should open a little box and optionnally the full page ; we're open to ideas to improve this doc, tell us if things are missing, if you have criticism about the structure etc. You can open a new ticket for that if you want.

Actions #11

Updated by Adam Clark almost 11 years ago

Adam Ross Clark: sure RedCloth doc is pretty complete, but Redmine one is accessible and should do the trick for 99% users.

I think it does the trick for 99% of the time, but in the end almost every user is going to hit a 1% edge case at some point. I don't think it's sensible for Redmine to include exhaustive documentation of Textile, but the fact that there are some excellent Textile docs out there, which are rendered more frustrating than helpful by the fact that large chunks of their content is unusable in Redmine, sort of highlights how far behind the curve the current implementation is.

Actions #12

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Defect #14038: Ordered/unordered lists inside table cell are mangled added
Actions #13

Updated by Gergely Nagy over 10 years ago

+1 Definition list support would be really nice

Actions #14

Updated by Toshi MARUYAMA almost 10 years ago

  • Related to Defect #16149: Textile within-word markup doesn't work added
Actions #15

Updated by Go MAEDA almost 9 years ago

  • Related to Defect #6796: Long Description Causes 100% CPU on Windows added
Actions #16

Updated by Go MAEDA over 8 years ago

Actions #17

Updated by Anton Statutov about 8 years ago

+1

Actions #18

Updated by Nils Grimm almost 8 years ago

+1, please Upgrade soon.

Actions #19

Updated by Jake Kemme over 7 years ago

Since it looks like there's been no movement on this in 5 years, I've created an initial plugin release that adds a 'Redcloth 4' text formatting option to redmine.

Redmine Redcloth Plugin

Feel free to try it out. I have not tested all possible renderings in the initial release. I've developed it against redmine 3.1 / 3.2, though it may work with other versions.

Actions #20

Updated by JW Fuchs over 7 years ago

+1

Actions #21

Updated by Go MAEDA over 5 years ago

  • Related to Defect #29746: Unexpected results with enumeration formatting in Textile added
Actions #22

Updated by Go MAEDA almost 3 years ago

  • Related to Feature #20511: Comments for Textile text formatting added
Actions

Also available in: Atom PDF