Commit 1f17bc549eef48696b8be7d2f35ff1408e5a5000

Ryan C. Gordon 2021-07-13T12:25:23

wikiheaders: look for "c++" before "c" in regular expression.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl
index 0d1de83..c7b84f3 100755
--- a/build-scripts/wikiheaders.pl
+++ b/build-scripts/wikiheaders.pl
@@ -123,7 +123,7 @@ sub wikify {
         $str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
 
         # Make some Markdown things into MediaWiki...
-        $str =~ s/\`\`\`(c|c++)(.*?)\`\`\`/<syntaxhighlight lang='$1'>$2<\/syntaxhighlight>/gms;
+        $str =~ s/\`\`\`(c\+\+|c)(.*?)\`\`\`/<syntaxhighlight lang='$1'>$2<\/syntaxhighlight>/gms;
 
         # <code></code> is also popular.  :/
         $str =~ s/\`(.*?)\`/<code>$1<\/code>/gms;