Skip to content

Conversation

@ksss
Copy link
Contributor

@ksss ksss commented Dec 2, 2025

Since [](n) is being interpreted as a Markdown link, it cannot be displayed as a method call.
I have corrected this by escaping the brackets so that they are interpreted as strings rather than links.

Before

ri

    #{}[n]     |   <tt>n</tt>th captured substring.    |       +nil+.

html

image

After

ri

    #[](n)     |   <tt>n</tt>th captured substring.    |       +nil+.

html

image

@ksss ksss mentioned this pull request Dec 2, 2025
@kou kou merged commit b3d5686 into ruby:master Dec 2, 2025
37 of 38 checks passed
@kou
Copy link
Member

kou commented Dec 2, 2025

Good catch!

matzbot pushed a commit to ruby/ruby that referenced this pull request Dec 2, 2025
(ruby/strscan#180)

Since `[](n)` is being interpreted as a Markdown link, it cannot be
displayed as a method call.
I have corrected this by escaping the brackets so that they are
interpreted as strings rather than links.

### Before

ri

```
    #{}[n]     |   <tt>n</tt>th captured substring.    |       +nil+.
```

html

<img width="424" height="217" alt="image"
src="https://github.com/user-attachments/assets/b45601ab-ed1c-4b82-b112-325f12bde197"
/>

### After

ri

```
    #[](n)     |   <tt>n</tt>th captured substring.    |       +nil+.
```

html

<img width="489" height="217" alt="image"
src="https://github.com/user-attachments/assets/1212c147-42a5-4f62-8667-a279ccff67a3"
/>

ruby/strscan@b3d56867fd
@ksss ksss deleted the doc-markdown branch December 2, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants