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/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,6 @@ def wrap(txt, line_len = 76)
# Character class to be separated by a space when concatenating
# lines.

SPACE_SEPARATED_LETTER_CLASS = /[\p{Nd}\p{Lc}\p{Pc}]/
SPACE_SEPARATED_LETTER_CLASS = /[\p{Nd}\p{Lc}\p{Pc}]|[!-~&&\W]/

end
14 changes: 13 additions & 1 deletion test/rdoc/test_rdoc_markup_to_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def accept_paragraph_br
end

def accept_paragraph_break
assert_equal "\n<p>hello<br>world</p>\n", @to.res.join
assert_equal "\n<p>hello<br> world</p>\n", @to.res.join
end

def accept_paragraph_i
Expand Down Expand Up @@ -416,6 +416,18 @@ def test_accept_paragraph_newline
@to.start_accepting
@to.accept_paragraph para("#{ohayo}\n", "#{sekai}\n")
assert_equal "\n<p>#{ohayo}#{sekai}</p>\n", @to.res.join

@to.start_accepting
@to.accept_paragraph para("+hello+\n", "world\n")
assert_equal "\n<p><code>hello</code> world</p>\n", @to.res.join

@to.start_accepting
@to.accept_paragraph para("hello\n", "+world+\n")
assert_equal "\n<p>hello <code>world</code></p>\n", @to.res.join

@to.start_accepting
@to.accept_paragraph para("+hello+\n", "+world+\n")
assert_equal "\n<p><code>hello</code> <code>world</code></p>\n", @to.res.join
end

def test_accept_heading_output_decoration
Expand Down