]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: config: set-var() dconv rendering issues
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 23 Mar 2023 10:54:44 +0000 (11:54 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Mar 2023 08:45:28 +0000 (09:45 +0100)
Since <cond> optional argument support was added to set-var() and friends
in 2.6 with 164726c ("DOC: vars: Add documentation about the set-var
conditions"), dconv is having a hard time rendering related keywords.

Everywhere `[,<cond> ...]` was inserted, html formatting is now broken.

Removing the space between <cond> and '...' allows dconv to properly parse
the token thus restores proper formatting without changing the meaning.

This was discovered when discussing about var() sample fetch doc issues
in GH #2087

This patch should be backported up to 2.6

doc/configuration.txt

index 0c22b8265fe20718b4cd95c968e7bb9f951f94bf..d3ebe9dafbc85ccbf40b0da8d56695beb773c5ba 100644 (file)
@@ -5915,8 +5915,8 @@ http-after-response <action> <options...> [ { if | unless } <condition> ]
     - set-log-level <level>
     - set-map(<file-name>) <key fmt> <value fmt>
     - set-status <status> [reason <str>]
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - strict-mode { on | off }
     - unset-var(<var-name>)
 
@@ -6052,8 +6052,8 @@ http-after-response set-status <status> [reason <str>]
   between 100 and 999. Please refer to "http-response set-status" for a complete
   description.
 
-http-after-response set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-http-after-response set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+http-after-response set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+http-after-response set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline. Please refer to "http-request set-var" and "http-request set-var-fmt"
@@ -6491,8 +6491,8 @@ http-check send-state
              "http-check send".
 
 
-http-check set-var(<var-name>[,<cond> ...]) <expr>
-http-check set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+http-check set-var(<var-name>[,<cond>...]) <expr>
+http-check set-var-fmt(<var-name>[,<cond>...]) <fmt>
   This operation sets the content of a variable. The variable is declared inline.
   May be used in sections:   defaults | frontend | listen | backend
                                yes    |    no    |   yes  |   yes
@@ -6685,8 +6685,8 @@ http-request <action> [options...] [ { if | unless } <condition> ]
     - set-timeout { server | tunnel } { <timeout> | <expr> }
     - set-tos <tos>
     - set-uri <fmt>
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - send-spoe-group <engine-name> <group-name>
     - silent-drop [ rst-ttl <ttl> ]
     - strict-mode { on | off }
@@ -7640,8 +7640,8 @@ http-request set-uri <fmt> [ { if | unless } <condition> ]
   and/or the query string should be set separately.
   See also "http-request set-path" and "http-request set-query".
 
-http-request set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-http-request set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+http-request set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+http-request set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline.
@@ -7881,8 +7881,8 @@ http-response <action> <options...> [ { if | unless } <condition> ]
     - set-nice <nice>
     - set-status <status> [reason <str>]
     - set-tos <tos>
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - silent-drop [ rst-ttl <ttl> ]
     - strict-mode { on | off }
     - track-sc0 <key> [table <table>]
@@ -8131,8 +8131,8 @@ http-response set-tos <tos> [ { if | unless } <condition> ]
   to the value passed in <tos> on platforms which support this. Please refer to
   "http-request set-tos" for a complete description.
 
-http-response set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-http-response set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+http-response set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+http-response set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline. Please refer to "http-request set-var" and "http-request set-var-fmt"
@@ -12848,8 +12848,8 @@ tcp-check send-binary-lf <hexfmt> [comment <msg>]
              "tcp-check send", tune.bufsize
 
 
-tcp-check set-var(<var-name>[,<cond> ...]) <expr>
-tcp-check set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+tcp-check set-var(<var-name>[,<cond>...]) <expr>
+tcp-check set-var-fmt(<var-name>[,<cond>...]) <fmt>
   This operation sets the content of a variable. The variable is declared inline.
   May be used in sections:   defaults | frontend | listen | backend
                                yes    |    no    |   yes  |   yes
@@ -12942,8 +12942,8 @@ tcp-request connection <action> <options...> [ { if | unless } <condition> ]
     - set-src <expr>
     - set-src-port <expr>
     - set-tos <tos>
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - silent-drop [ rst-ttl <ttl> ]
     - track-sc0 <key> [table <table>]
     - track-sc1 <key> [table <table>]
@@ -13080,8 +13080,8 @@ tcp-request connection set-tos <tos> [ { if | unless } <condition> ]
   to the value passed in <tos> on platforms which support this. Please refer to
   "http-request set-tos" for a complete description.
 
-tcp-request connection set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-tcp-request connection set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+tcp-request connection set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+tcp-request connection set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline. "tcp-request connection" can set variables in the "proc" and "sess"
@@ -13167,8 +13167,8 @@ tcp-request content <action> [{if | unless} <condition>]
     - set-src <expr>
     - set-src-port <expr>
     - set-tos <tos>
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - silent-drop [ rst-ttl <ttl> ]
     - switch-mode http [ proto <name> ]
     - track-sc0 <key> [table <table>]
@@ -13411,8 +13411,8 @@ tcp-request content set-tos <tos> [ { if | unless } <condition> ]
   to the value passed in <tos> on platforms which support this. Please refer to
   "http-request set-tos" for a complete description.
 
-tcp-request content set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-tcp-request content set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+tcp-request content set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+tcp-request content set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline. Please refer to "http-request set-var" and "http-request set-var-fmt"
@@ -13565,8 +13565,8 @@ tcp-request session <action> [{if | unless} <condition>]
     - set-src <expr>
     - set-src-port <expr>
     - set-tos <tos>
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - silent-drop [ rst-ttl <ttl> ]
     - track-sc0 <key> [table <table>]
     - track-sc1 <key> [table <table>]
@@ -13677,8 +13677,8 @@ tcp-request session set-tos <tos> [ { if | unless } <condition> ]
   to the value passed in <tos> on platforms which support this. Please refer to
   "http-request set-tos" for a complete description.
 
-tcp-request session set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-tcp-request session set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+tcp-request session set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+tcp-request session set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline. Please refer to "http-request set-var" and "http-request set-var-fmt"
@@ -13745,8 +13745,8 @@ tcp-response content <action> [{if | unless} <condition>]
     - set-mark <mark>
     - set-nice <nice>
     - set-tos <tos>
-    - set-var(<var-name>[,<cond> ...]) <expr>
-    - set-var-fmt(<var-name>[,<cond> ...]) <fmt>
+    - set-var(<var-name>[,<cond>...]) <expr>
+    - set-var-fmt(<var-name>[,<cond>...]) <fmt>
     - silent-drop [ rst-ttl <ttl> ]
     - unset-var(<var-name>)
 
@@ -13855,8 +13855,8 @@ tcp-response content set-tos <tos> [ { if | unless } <condition> ]
   to the value passed in <tos> on platforms which support this. Please refer to
   "http-request set-tos" for a complete description.
 
-tcp-response content set-var(<var-name>[,<cond> ...]) <expr> [ { if | unless } <condition> ]
-tcp-response content set-var-fmt(<var-name>[,<cond> ...]) <fmt> [ { if | unless } <condition> ]
+tcp-response content set-var(<var-name>[,<cond>...]) <expr> [ { if | unless } <condition> ]
+tcp-response content set-var-fmt(<var-name>[,<cond>...]) <fmt> [ { if | unless } <condition> ]
 
   This is used to set the contents of a variable. The variable is declared
   inline. Please refer to "http-request set-var" and "http-request set-var-fmt"
@@ -18380,7 +18380,7 @@ secure_memcmp(<var>)
      # value, without leaking the contents using a timing attack.
      acl token_given str(my_secret_token),secure_memcmp(txn.token)
 
-set-var(<var>[,<cond> ...])
+set-var(<var>[,<cond>...])
   Sets a variable with the input content and returns the content on the output
   as-is if all of the specified conditions are true (see below for a list of
   possible conditions). The variable keeps the value and the associated input