From ffe4e571d150fccf34826723475e05750619e865 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 4 Oct 2024 15:33:41 -0400 Subject: [PATCH] wikiheaders: regex hack to make a URL not confuse wikilink genertion. --- build-scripts/wikiheaders.pl | 6 +++--- include/SDL3/SDL_gpu.h | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl index aee4dbc70f..071e4695d1 100755 --- a/build-scripts/wikiheaders.pl +++ b/build-scripts/wikiheaders.pl @@ -276,14 +276,14 @@ sub wikify_chunk { $codedstr .= wikify_chunk($wikitype, $1, undef, undef); if (defined $apiprefixregex) { # Convert obvious API things to wikilinks, even inside `code` blocks. - $codeblock =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms; + $codeblock =~ s/(\A|[^\/a-zA-Z0-9_])($apiprefixregex[a-zA-Z0-9_]+)/$1\[\[$2\]\]/gms; } $codedstr .= "$codeblock"; } # Convert obvious API things to wikilinks. if (defined $apiprefixregex) { - $str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms; + $str =~ s/(\A|[^\/a-zA-Z0-9_])($apiprefixregex[a-zA-Z0-9_]+)/$1\[\[$2\]\]/gms; } # Make some Markdown things into MediaWiki... @@ -328,7 +328,7 @@ sub wikify_chunk { # Convert obvious API things to wikilinks. if (defined $apiprefixregex) { - $str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms; + $str =~ s/(\A|[^\/a-zA-Z0-9_])($apiprefixregex[a-zA-Z0-9_]+)/$1\[$2\]\($2\)/gms; } $str = $codedstr . $str; diff --git a/include/SDL3/SDL_gpu.h b/include/SDL3/SDL_gpu.h index 123c8dc24f..bc8882e172 100644 --- a/include/SDL3/SDL_gpu.h +++ b/include/SDL3/SDL_gpu.h @@ -147,9 +147,7 @@ * limited hardware support, this API is probably not for you. * * Examples demonstrating proper usage of this API can be found - * [here](https://github.com/TheSpydog/SDL_gpu_examples - * ) - * . + * [here](https://github.com/TheSpydog/SDL_gpu_examples). */ #ifndef SDL_gpu_h_