doc: a code example misses a "return". thanks YuanSheng Wang for the patch in #572.
This commit is contained in:
Родитель
6b558cd4bd
Коммит
a688d5a068
|
@ -1430,7 +1430,7 @@ This directive can be freely mixed with all directives of the [ngx_http_rewrite_
|
|||
```nginx
|
||||
|
||||
set $foo 32;
|
||||
set_by_lua $bar 'tonumber(ngx.var.foo) + 1';
|
||||
set_by_lua $bar 'return tonumber(ngx.var.foo) + 1';
|
||||
set $baz "bar: $bar"; # $baz == "bar: 33"
|
||||
```
|
||||
|
||||
|
|
|
@ -1167,7 +1167,7 @@ This directive can be freely mixed with all directives of the [[HttpRewriteModul
|
|||
|
||||
<geshi lang="nginx">
|
||||
set $foo 32;
|
||||
set_by_lua $bar 'tonumber(ngx.var.foo) + 1';
|
||||
set_by_lua $bar 'return tonumber(ngx.var.foo) + 1';
|
||||
set $baz "bar: $bar"; # $baz == "bar: 33"
|
||||
</geshi>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче