From e2bf64b0e40233c6dc9047f4078fc95abe23baa8 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Mon, 27 Apr 2026 08:55:57 +0200 Subject: [PATCH] Fix `call-seq` formatting They don't work in included markdown and also need a leading `:` --- doc/strscan/methods/get_byte.md | 3 --- doc/strscan/methods/get_charpos.md | 3 --- doc/strscan/methods/get_pos.md | 3 --- doc/strscan/methods/getch.md | 3 --- doc/strscan/methods/scan.md | 3 --- doc/strscan/methods/scan_until.md | 3 --- doc/strscan/methods/set_pos.md | 4 ---- doc/strscan/methods/skip.md | 3 --- doc/strscan/methods/skip_until.md | 3 --- doc/strscan/methods/terminate.md | 3 --- ext/strscan/strscan.c | 31 ++++++++++++++++++++++++++++++ 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/doc/strscan/methods/get_byte.md b/doc/strscan/methods/get_byte.md index 3208d77158..775226638e 100644 --- a/doc/strscan/methods/get_byte.md +++ b/doc/strscan/methods/get_byte.md @@ -1,6 +1,3 @@ -call-seq: - get_byte -> byte_as_character or nil - Returns the next byte, if available: - If the [position][2] diff --git a/doc/strscan/methods/get_charpos.md b/doc/strscan/methods/get_charpos.md index 954fcf5b44..4de07897dc 100644 --- a/doc/strscan/methods/get_charpos.md +++ b/doc/strscan/methods/get_charpos.md @@ -1,6 +1,3 @@ -call-seq: - charpos -> character_position - Returns the [character position][7] (initially zero), which may be different from the [byte position][2] given by method #pos: diff --git a/doc/strscan/methods/get_pos.md b/doc/strscan/methods/get_pos.md index 81bbb2345e..56b1636812 100644 --- a/doc/strscan/methods/get_pos.md +++ b/doc/strscan/methods/get_pos.md @@ -1,6 +1,3 @@ -call-seq: - pos -> byte_position - Returns the integer [byte position][2], which may be different from the [character position][7]: diff --git a/doc/strscan/methods/getch.md b/doc/strscan/methods/getch.md index 3dd70e4c5b..ede1d2b071 100644 --- a/doc/strscan/methods/getch.md +++ b/doc/strscan/methods/getch.md @@ -1,6 +1,3 @@ -call-seq: - getch -> character or nil - Returns the next (possibly multibyte) character, if available: diff --git a/doc/strscan/methods/scan.md b/doc/strscan/methods/scan.md index 22ddd368b6..805c797913 100644 --- a/doc/strscan/methods/scan.md +++ b/doc/strscan/methods/scan.md @@ -1,6 +1,3 @@ -call-seq: - scan(pattern) -> substring or nil - Attempts to [match][17] the given `pattern` at the beginning of the [target substring][3]. diff --git a/doc/strscan/methods/scan_until.md b/doc/strscan/methods/scan_until.md index 9a8c7c02f6..5fb2912a1b 100644 --- a/doc/strscan/methods/scan_until.md +++ b/doc/strscan/methods/scan_until.md @@ -1,6 +1,3 @@ -call-seq: - scan_until(pattern) -> substring or nil - Attempts to [match][17] the given `pattern` anywhere (at any [position][2]) in the [target substring][3]. diff --git a/doc/strscan/methods/set_pos.md b/doc/strscan/methods/set_pos.md index 3b7abe65e3..6a43edeb41 100644 --- a/doc/strscan/methods/set_pos.md +++ b/doc/strscan/methods/set_pos.md @@ -1,7 +1,3 @@ -call-seq: - pos = n -> n - pointer = n -> n - Sets the [byte position][2] and the [character position][11]; returns `n`. diff --git a/doc/strscan/methods/skip.md b/doc/strscan/methods/skip.md index 10a329e0e4..7e924b624b 100644 --- a/doc/strscan/methods/skip.md +++ b/doc/strscan/methods/skip.md @@ -1,6 +1,3 @@ -call-seq: - skip(pattern) match_size or nil - Attempts to [match][17] the given `pattern` at the beginning of the [target substring][3]; diff --git a/doc/strscan/methods/skip_until.md b/doc/strscan/methods/skip_until.md index 4c78c4f3ed..a0ffab0b84 100644 --- a/doc/strscan/methods/skip_until.md +++ b/doc/strscan/methods/skip_until.md @@ -1,6 +1,3 @@ -call-seq: - skip_until(pattern) -> matched_substring_size or nil - Attempts to [match][17] the given `pattern` anywhere (at any [position][2]) in the [target substring][3]. diff --git a/doc/strscan/methods/terminate.md b/doc/strscan/methods/terminate.md index b03b37d2a2..27f7d41cb1 100644 --- a/doc/strscan/methods/terminate.md +++ b/doc/strscan/methods/terminate.md @@ -1,6 +1,3 @@ -call-seq: - terminate -> self - Sets the scanner to end-of-string; returns +self+: diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index e0f0e2adc5..823f9cf572 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -410,6 +410,9 @@ strscan_reset(VALUE self) /* * :markup: markdown + * :call-seq: + * terminate -> self + * * :include: strscan/link_refs.txt * :include: strscan/methods/terminate.md */ @@ -539,6 +542,9 @@ strscan_concat(VALUE self, VALUE str) /* * :markup: markdown + * :call-seq: + * pos -> byte_position + * * :include: strscan/link_refs.txt * :include: strscan/methods/get_pos.md */ @@ -553,6 +559,9 @@ strscan_get_pos(VALUE self) /* * :markup: markdown + * :call-seq: + * charpos -> character_position + * * :include: strscan/link_refs.txt * :include: strscan/methods/get_charpos.md */ @@ -568,6 +577,10 @@ strscan_get_charpos(VALUE self) /* * :markup: markdown + * :call-seq: + * pos = n -> n + * pointer = n -> n + * * :include: strscan/link_refs.txt * :include: strscan/methods/set_pos.md */ @@ -792,6 +805,9 @@ strscan_do_scan(VALUE self, VALUE pattern, int succptr, int getstr, int headonly /* * :markup: markdown + * :call-seq: + * scan(pattern) -> substring or nil + * * :include: strscan/link_refs.txt * :include: strscan/methods/scan.md */ @@ -865,6 +881,9 @@ strscan_match_p(VALUE self, VALUE re) /* * :markup: markdown + * call-seq: + * skip(pattern) match_size or nil + * * :include: strscan/link_refs.txt * :include: strscan/methods/skip.md */ @@ -962,6 +981,9 @@ strscan_scan_full(VALUE self, VALUE re, VALUE s, VALUE f) /* * :markup: markdown + * :call-seq: + * scan_until(pattern) -> substring or nil + * * :include: strscan/link_refs.txt * :include: strscan/methods/scan_until.md */ @@ -1036,6 +1058,9 @@ strscan_exist_p(VALUE self, VALUE re) /* * :markup: markdown + * :call-seq: + * skip_until(pattern) -> matched_substring_size or nil + * * :include: strscan/link_refs.txt * :include: strscan/methods/skip_until.md */ @@ -1147,6 +1172,9 @@ adjust_registers_to_matched(struct strscanner *p) /* * :markup: markdown + * :call-seq: + * getch -> character or nil + * * :include: strscan/link_refs.txt * :include: strscan/methods/getch.md */ @@ -1220,6 +1248,9 @@ strscan_peek_byte(VALUE self) /* * :markup: markdown + * :call-seq: + * get_byte -> byte_as_character or nil + * * :include: strscan/link_refs.txt * :include: strscan/methods/get_byte.md */