Skip to content

Fix tag in table_of_contents.html #549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2017
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