]> source.dussan.org Git - redmine.git/commitdiff
Fixed bold syntax around single character in series (#2351).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 28 Dec 2008 10:12:09 +0000 (10:12 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 28 Dec 2008 10:12:09 +0000 (10:12 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2191 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redcloth3.rb
test/unit/helpers/application_helper_test.rb

index 038522a89ed5a58e5aa439fee99a1a5d906cd86b..69332395bd9fcdb1da6435807619addbcc1cca8e 100644 (file)
@@ -382,14 +382,14 @@ class RedCloth3 < String
                 (#{rcq})
                 (#{C})
                 (?::(\S+?))?
-                ([^\s\-].*?[^\s\-]|\w)
+                (\w|[^\s\-].*?[^\s\-])
                 #{rcq}
                 (?=[[:punct:]]|\s|\)|$)/x
             else
                 /(#{rcq})
                 (#{C})
                 (?::(\S+))?
-                ([^\s\-].*?[^\s\-]|\w)
+                (\w|[^\s\-].*?[^\s\-])
                 #{rcq}/xm 
             end
         [rc, ht, re, rtype]
index d2d1a1f198ee49c1ce36227dcf1e2b861e1b2733..261614d3f7dac782481d024977d36a31b11840d9 100644 (file)
@@ -251,7 +251,10 @@ EXPECTED
   
   def test_text_formatting
     to_test = {'*_+bold, italic and underline+_*' => '<strong><em><ins>bold, italic and underline</ins></em></strong>',
-               '(_text within parentheses_)' => '(<em>text within parentheses</em>)'
+               '(_text within parentheses_)' => '(<em>text within parentheses</em>)',
+               'a *Humane Web* Text Generator' => 'a <strong>Humane Web</strong> Text Generator',
+               'a H *umane* W *eb* T *ext* G *enerator*' => 'a H <strong>umane</strong> W <strong>eb</strong> T <strong>ext</strong> G <strong>enerator</strong>',
+               'a *H* umane *W* eb *T* ext *G* enerator' => 'a <strong>H</strong> umane <strong>W</strong> eb <strong>T</strong> ext <strong>G</strong> enerator',
               }
     to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
   end