From bce764d9bc1e5409dd4b0b40156ad75791935a61 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 29 Dec 2008 15:27:29 +0000 Subject: [PATCH] Merged r2191 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2198 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 4 ++-- test/unit/helpers/application_helper_test.rb | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index c6ab88660..ae17f6760 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -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] diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 01333dcdc..5f1a58935 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -252,7 +252,10 @@ EXPECTED def test_text_formatting to_test = {'*_+bold, italic and underline+_*' => 'bold, italic and underline', - '(_text within parentheses_)' => '(text within parentheses)' + '(_text within parentheses_)' => '(text within parentheses)', + 'a *Humane Web* Text Generator' => 'a Humane Web Text Generator', + 'a H *umane* W *eb* T *ext* G *enerator*' => 'a H umane W eb T ext G enerator', + 'a *H* umane *W* eb *T* ext *G* enerator' => 'a H umane W eb T ext G enerator', } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end -- 2.39.5