Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rdoc/markup/attribute_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def add_special pattern, name
# Processes +str+ converting attributes, HTML and specials

def flow str
@str = str
@str = str.dup

mask_protected_sequences

Expand Down
8 changes: 8 additions & 0 deletions test/test_rdoc_markup_attribute_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@ def test_protect
@am.flow("\\_cat_<i>dog</i>"))
end

def test_lost_tag_for_the_second_time
str = "cat <tt>dog</tt>"
assert_equal(["cat ", @tt_on, "dog", @tt_off],
@am.flow(str))
assert_equal(["cat ", @tt_on, "dog", @tt_off],
@am.flow(str))
end

def test_special
@am.add_special(RDoc::CrossReference::CROSSREF_REGEXP, :CROSSREF)

Expand Down