mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
wikiheaders: regex hack to make a URL not confuse wikilink genertion.
This commit is contained in:
@@ -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 .= "<code>$codeblock</code>";
|
||||
}
|
||||
|
||||
# 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;
|
||||
|
||||
Reference in New Issue
Block a user