From 32909591d28c35c6cb7f695e7eccb9961b9acff9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 8 Sep 2025 17:29:56 +0200 Subject: [PATCH] docs: put `<>` within backticks in titles To render better markdown. Make managen warn if present "unticked" and unescaped. Closes #18498 --- docs/cmdline-opts/_ENVIRONMENT.md | 34 +++++++++++++++---------------- docs/cmdline-opts/interface.md | 6 +++--- scripts/managen | 7 +++++++ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/docs/cmdline-opts/_ENVIRONMENT.md b/docs/cmdline-opts/_ENVIRONMENT.md index a37e074d05..9562c630a1 100644 --- a/docs/cmdline-opts/_ENVIRONMENT.md +++ b/docs/cmdline-opts/_ENVIRONMENT.md @@ -8,21 +8,21 @@ available in lower case. Using an environment variable to set the proxy has the same effect as using the --proxy option. -## `http_proxy` [protocol://][:port] +## `http_proxy [protocol://][:port]` Sets the proxy server to use for HTTP. -## `HTTPS_PROXY` [protocol://][:port] +## `HTTPS_PROXY [protocol://][:port]` Sets the proxy server to use for HTTPS. -## `[url-protocol]_PROXY` [protocol://][:port] +## `[url-protocol]_PROXY [protocol://][:port]` Sets the proxy server to use for [url-protocol], where the protocol is a protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP, etc. -## `ALL_PROXY` [protocol://][:port] +## `ALL_PROXY [protocol://][:port]` Sets the proxy server to use if no protocol-specific proxy is set. -## `NO_PROXY` +## `NO_PROXY ` list of hostnames that should not go through any proxy. If set to an asterisk '*' only, it matches all hosts. Each name in this list is matched as either a domain name which contains the hostname, or the hostname itself. @@ -48,24 +48,24 @@ number specifies the number of "network bits" out of the address to use in the comparison (added in 7.86.0). For example "192.168.0.0/16" would match all addresses starting with "192.168". -## `APPDATA` +## `APPDATA ` On Windows, this variable is used when trying to find the home directory. If the primary home variables are all unset. -## `COLUMNS` +## `COLUMNS ` If set, the specified number of characters is used as the terminal width when the alternative progress-bar is shown. If not set, curl tries to figure it out using other ways. -## `CURL_CA_BUNDLE` +## `CURL_CA_BUNDLE ` If set, it is used as the --cacert value. This environment variable is ignored if Schannel is used as the TLS backend. -## `CURL_HOME` +## `CURL_HOME ` If set, is the first variable curl checks when trying to find its home directory. If not set, it continues to check *XDG_CONFIG_HOME* -## `CURL_SSL_BACKEND` +## `CURL_SSL_BACKEND ` If curl was built with support for "MultiSSL", meaning that it has built-in support for more than one TLS backend, this environment variable can be set to the case insensitive name of the particular backend to use when curl is @@ -75,12 +75,12 @@ with the default. SSL backend names (case-insensitive): **gnutls**, **mbedtls**, **openssl**, **rustls**, **schannel**, **wolfssl** -## `HOME` +## `HOME ` If set, this is used to find the home directory when that is needed. Like when looking for the default .curlrc. *CURL_HOME* and *XDG_CONFIG_HOME* have preference. -## `QLOGDIR` +## `QLOGDIR ` If curl was built with HTTP/3 support, setting this environment variable to a local directory makes curl produce **qlogs** in that directory, using file names named after the destination connection id (in hex). Do note that these @@ -89,26 +89,26 @@ files can become rather large. Works with the ngtcp2 and quiche QUIC backends. ## `SHELL` Used on VMS when trying to detect if using a **DCL** or a **Unix** shell. -## `SSL_CERT_DIR` +## `SSL_CERT_DIR ` If set, it is used as the --capath value. This environment variable is ignored if Schannel is used as the TLS backend. -## `SSL_CERT_FILE` +## `SSL_CERT_FILE ` If set, it is used as the --cacert value. This environment variable is ignored if Schannel is used as the TLS backend. -## `SSLKEYLOGFILE` +## `SSLKEYLOGFILE ` If you set this environment variable to a filename, curl stores TLS secrets from its connections in that file when invoked to enable you to analyze the TLS traffic in real time using network analyzing tools such as Wireshark. This works with the following TLS backends: OpenSSL, LibreSSL (TLS 1.2 max), BoringSSL, GnuTLS, wolfSSL and Rustls. -## `USERPROFILE` +## `USERPROFILE ` On Windows, this variable is used when trying to find the home directory. If the other, primary, variables are all unset. If set, curl uses the path **"$USERPROFILE\Application Data"**. -## `XDG_CONFIG_HOME` +## `XDG_CONFIG_HOME ` If *CURL_HOME* is not set, this variable is checked when looking for a default .curlrc file. diff --git a/docs/cmdline-opts/interface.md b/docs/cmdline-opts/interface.md index 539e39272b..1609cc35d3 100644 --- a/docs/cmdline-opts/interface.md +++ b/docs/cmdline-opts/interface.md @@ -21,16 +21,16 @@ Perform the operation using a specified interface. You can enter interface name, IP address or hostname. If you prefer to be specific, you can use the following special syntax: -## if! +## `if!` Interface name. If the provided name does not match an existing interface, curl returns with error 45. -## host! +## `host!` IP address or hostname. -## ifhost!! +## `ifhost!!` Interface name and IP address or hostname. This syntax requires libcurl 8.9.0 or later. diff --git a/scripts/managen b/scripts/managen index d565246b87..459b651240 100755 --- a/scripts/managen +++ b/scripts/managen @@ -373,12 +373,19 @@ sub render { } elsif(/^## (.*)/) { my $word = $1; + my $nontick = $word; # if there are enclosing quotes, remove them first $word =~ s/[\"\'](.*)[\"\']\z/$1/; # remove backticks from headers $word =~ s/\`//g; + # remove backticked sections + $nontick =~ s/\`[^\`]*\`//g; + if($nontick =~ /[^\\][\<\>]/) { + print STDERR "$f:$line:1:WARN: un-escaped < or > used: $nontick\n"; + } + # if there is a space, it needs quotes for manpage if(($word =~ / /) && $manpage) { $word = "\"$word\""; -- 2.47.3