зеркало из https://github.com/github/ruby.git
[ruby/rdoc] Fix TIDYLINK after braces
(https://github.com/ruby/rdoc/pull/1015) TIDYLINK multi-word label should not include braces. https://github.com/ruby/rdoc/commit/41ad3191e9
This commit is contained in:
Родитель
50e1c293b7
Коммит
9935512275
|
@ -90,7 +90,7 @@ class RDoc::Markup::Formatter
|
|||
|
||||
def add_regexp_handling_TIDYLINK
|
||||
@markup.add_regexp_handling(/(?:
|
||||
\{.*?\} | # multi-word label
|
||||
\{[^{}]*\} | # multi-word label
|
||||
\b[^\s{}]+? # single-word label
|
||||
)
|
||||
|
||||
|
|
|
@ -104,6 +104,12 @@ class TestRDocMarkupFormatter < RDoc::TestCase
|
|||
formatted = document.accept @to
|
||||
|
||||
assert_equal '<{foo}[rdoc-label:bar]>.', formatted
|
||||
|
||||
document = doc(para('<tt>{abc}</tt>: {foo}[rdoc-label:bar].'))
|
||||
|
||||
formatted = document.accept @to
|
||||
|
||||
assert_equal '<code>{abc}</code>: <{foo}[rdoc-label:bar]>.', formatted
|
||||
end
|
||||
|
||||
def test_parse_url
|
||||
|
|
Загрузка…
Ссылка в новой задаче