Skip to content

Commit b3d5686

Browse files
authored
[DOC] Avoid being interpreted as a link (#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" />
1 parent adb8678 commit b3d5686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/strscan/strscan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ Each of these methods returns a captured match value:
417417
| Method | Return After Match | Return After No Match |
418418
|-----------------|-----------------------------------------|-----------------------|
419419
| #size | Count of captured substrings. | +nil+. |
420-
| #[](n) | <tt>n</tt>th captured substring. | +nil+. |
420+
| #\[\](n) | <tt>n</tt>th captured substring. | +nil+. |
421421
| #captures | Array of all captured substrings. | +nil+. |
422422
| #values_at(*n) | Array of specified captured substrings. | +nil+. |
423423
| #named_captures | Hash of named captures. | <tt>{}</tt>. |

0 commit comments

Comments
 (0)