Defect #1225

Textile: bold, italics, underline, etc... not working after parentheses

Added by Philip Hofstetter over 14 years ago. Updated over 14 years ago.

Status:ClosedStart date:2008-05-12
Priority:LowDue date:
Assignee:-% Done:


Target version:0.7.2
Resolution:Fixed Affected version:0.7.1


the textile inline formating markers (*, _, +) don't work right after parentheses. An example is the following which should of course be marked as italics, but isn't:

some italizised text

The following patch to redcloth.rb fixes the problem:

--- redmine-0.7.1/lib/redcloth.rb    2008-05-04 12:30:06.000000000 +0200
+++ redmine/lib/redcloth.rb    2008-05-12 17:25:16.803532888 +0200
@@ -376,13 +376,13 @@
         re =
             case rtype
             when :limit
-                /(^|[>\s])
+                /(^|[>\W])
-                (?=[[:punct:]]|\s|$)/x
+                (?=[[:punct:]]|\W|$)/x

Maybe this should be reported upstream?

The regex used only matches the markers following (or before) spaces, when instead it's better to mark after any non-word character.

Hope this helps


Associated revisions

Revision 1434
Added by Jean-Philippe Lang over 14 years ago

Fixed: bold, italics, underline not working within parentheses (#1225).


#1 Updated by Philip Hofstetter over 14 years ago

the sample line given was, of course wrong as I left out the thing causing the bug: The parentheses:

(this should be italizised but is not)

The patch is correct though :-)


#2 Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from New to Closed
  • Target version set to 0.7.2
  • Resolution set to Fixed

Fixed in r1434.
I didn't use \W since it would match too often, even when it's not wanted.

Also available in: Atom PDF