Also use ? as delimiter for method slugging

This commit is contained in:
ChillerDragon 2023-09-17 15:24:40 +02:00
parent 4698173d69
commit ab2e62e4e8
4 changed files with 4 additions and 2 deletions

View file

@ -53,7 +53,7 @@ Version v0.0.1
[#initialize(options = {})](classes/TeeworldsClient.md#initialize) [#initialize(options = {})](classes/TeeworldsClient.md#initialize)
[#rcon_authed? -> Boolean](classes/TeeworldsClient.md#rcon_authed? -> Boolean) [#rcon_authed? -> Boolean](classes/TeeworldsClient.md#rcon_authed)
[#send_ctrl_close](classes/TeeworldsClient.md#send_ctrl_close) [#send_ctrl_close](classes/TeeworldsClient.md#send_ctrl_close)

View file

@ -387,7 +387,7 @@ client = TeeworldsClient.new(verbose: true, config: "autoexec.cfg")
client.connect('localhost', 8303, detach: false) client.connect('localhost', 8303, detach: false)
``` ```
### <a name="rcon_authed?"></a> #rcon_authed? -> Boolean ### <a name="rcon_authed"></a> #rcon_authed? -> Boolean
Returns true if the client is currently rcon authenticated. Returns true if the client is currently rcon authenticated.

View file

@ -38,6 +38,7 @@ function print_instance_methods() {
while read -r hook while read -r hook
do do
hook_slug="${hook%%(*}" hook_slug="${hook%%(*}"
hook_slug="${hook_slug%%\?*}"
echo "" echo ""
echo "[#$hook](classes/$class.md#$hook_slug)" echo "[#$hook](classes/$class.md#$hook_slug)"
done < <(grep '### <a name="' "docs/$version/classes/$class.md" | cut -d'#' -f5) done < <(grep '### <a name="' "docs/$version/classes/$class.md" | cut -d'#' -f5)

View file

@ -54,6 +54,7 @@ function print_method_doc() {
local method="$2" local method="$2"
local method_slug local method_slug
method_slug="${method%%(*}" method_slug="${method%%(*}"
method_slug="${method_slug%%\?*}"
local obj_var=client local obj_var=client
local run="client.connect('localhost', 8303, detach: false)" local run="client.connect('localhost', 8303, detach: false)"
if [[ "$ruby_class" =~ Server ]] if [[ "$ruby_class" =~ Server ]]