Commit e1b0aef
committed
Add regression tests for
When `<code>#method</code>` (or `<tt>#method</tt>`) appears in markup and
the method does not resolve to a known method, the inline code formatting
and `#` prefix must be preserved verbatim. caad3b9 fixed the underlying
behavior by returning nil from `link` and falling back to the original
text in `cross_reference`, but the bug from #1684 had no direct test
coverage for the `<code>#unresolved</code>` form that the issue reported.
These tests lock in the fix using the exact wording from
`doc/syntax/calling_methods.rdoc` that triggered the bug, plus the
`<tt>` alias, methods ending in `?`/`!`, and a mixed case where an
unresolved `<code>#nope</code>` sits next to a resolvable class
reference.<code>#method</code> preservation1 parent bc0baee commit e1b0aef
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
438 | 472 | | |
439 | 473 | | |
440 | 474 | | |
| |||
0 commit comments