diff options
| author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-09 15:01:53 +0000 |
|---|---|---|
| committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-09 15:01:53 +0000 |
| commit | 92edd39e24a690f2d140c3f921573c663f33eb8a (patch) | |
| tree | 80fd919bcf08cbf61d807daeb6ecc2892df60005 | |
| parent | 72d9aee28bb76c42b79fb33e27d59e3d49bd9b41 (diff) | |
| download | ruby-92edd39e24a690f2d140c3f921573c663f33eb8a.tar.gz ruby-92edd39e24a690f2d140c3f921573c663f33eb8a.tar.xz ruby-92edd39e24a690f2d140c3f921573c663f33eb8a.zip | |
Fixed problem with \_cat_<b>dog</b>
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/rdoc/markup/simple_markup/inline.rb | 21 | ||||
| -rw-r--r-- | lib/rdoc/markup/test/TestInline.rb | 3 |
3 files changed, 13 insertions, 16 deletions
@@ -1,3 +1,8 @@ +Sat Apr 10 00:00:19 2004 Dave Thomas <dave@pragprog.com> + + * lib/rdoc/markup/simple_markup/inline.rb: Fix problem + with \_cat_<b>dog</b> + Wed Apr 7 00:19:50 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp> * lib/rinda/rinda.rb: fix hash tuple bug. diff --git a/lib/rdoc/markup/simple_markup/inline.rb b/lib/rdoc/markup/simple_markup/inline.rb index 7b476e559..1e76c201c 100644 --- a/lib/rdoc/markup/simple_markup/inline.rb +++ b/lib/rdoc/markup/simple_markup/inline.rb @@ -97,20 +97,6 @@ module SM # be optimistic # -=begin - ATTR_FLAG = 001 - A_START = 002 - A_END = 003 - A_SPECIAL_START = 005 - A_SPECIAL_END = 006 - - START_ATTR = ATTR_FLAG.chr + A_START.chr - END_ATTR = ATTR_FLAG.chr + A_END.chr - - START_SPECIAL = ATTR_FLAG.chr + A_SPECIAL_START.chr - END_SPECIAL = ATTR_FLAG.chr + A_SPECIAL_END.chr - -=end A_PROTECT = 004 PROTECT_ATTR = A_PROTECT.chr @@ -216,7 +202,7 @@ module SM end def unmask_protected_sequences - @str.gsub!(/(.)#{PROTECT_ATTR}/, '\1') + @str.gsub!(/(.)#{PROTECT_ATTR}/, "\\1\000") end def initialize @@ -257,10 +243,13 @@ module SM def flow(str) @str = str - @attrs = AttrSpan.new(str.length) puts("Before flow, str='#{@str.dump}'") if $DEBUG mask_protected_sequences + + @attrs = AttrSpan.new(@str.length) + + puts("After protecting, str='#{@str.dump}'") if $DEBUG convert_attrs(@str, @attrs) convert_html(@str, @attrs) convert_specials(str, @attrs) diff --git a/lib/rdoc/markup/test/TestInline.rb b/lib/rdoc/markup/test/TestInline.rb index c76f21dce..a067d4c24 100644 --- a/lib/rdoc/markup/test/TestInline.rb +++ b/lib/rdoc/markup/test/TestInline.rb @@ -141,6 +141,9 @@ class TestInline < Test::Unit::TestCase @am.flow("cat <i>and</i> \\<B>dog</b>")) assert_equal(["*word* or <b>text</b>"], @am.flow("\\*word* or \\<b>text</b>")) + + assert_equal(["_cat_", @em_on, "dog", @em_off], + @am.flow("\\_cat_<i>dog</i>")) end def test_adding |
