Skip to content

Commit

Permalink
curlopt2href.pl: special-case the debug function CURLINFO defines
Browse files Browse the repository at this point in the history
Reported-by: Jeroen Ooms
Fixes #309
  • Loading branch information
bagder committed Oct 14, 2023
1 parent 59c1a5d commit 64a25ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcurl/c/curlopt2href.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#

while(<STDIN>) {
# The debug function defines are *badly* reusing the same prefix as the
# options for curl_easy_getinfo, so special-case them in a separate regex
# first. Skip if preceded by letters making it likely to be a link
$_ =~ s/([^\">\/])(CURLINFO_(TEXT|HEADER_IN|HEADER_OUT|DATA_IN|DATA_OUT|SSL_DATA_IN|SSL_DATA_OUT|END))/$1<a href="CURLOPT_DEBUGFUNCTION.html#DESCRIPTION">$2<\/a>/g;
# skip if preceded by letters making it likely to be a link
$_ =~ s/([^\">\/])(CURL(OPT|INFO|MOPT|SHOPT)_[A-Z_0-9]+)/$1<a href="$2.html">$2<\/a>/g;
# also linkify libcurl function calls
Expand Down

0 comments on commit 64a25ac

Please sign in to comment.