Skip to content

Commit 00e0d75

Browse files
committed
doc: various formatting improvements.
1 parent a59373b commit 00e0d75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Note that at least [ngx_lua 0.7.9](https://github.com/chaoslawful/lua-nginx-modu
2929
Synopsis
3030
========
3131

32+
```lua
3233
lua_package_path "/path/to/lua-resty-redis/lib/?.lua;;";
3334

3435
server {
@@ -67,6 +68,7 @@ Synopsis
6768
';
6869
}
6970
}
71+
```
7072

7173
A typical output of the /test location defined above is:
7274

@@ -85,6 +87,7 @@ A typical output of the /test location defined above is:
8587

8688
You can use the [lua-resty-string](https://github.com/agentzh/lua-resty-string) library to compute SHA-1 and MD5 digest of the file data incrementally. Here is such an example:
8789

90+
```lua
8891
local resty_sha1 = require "resty.sha1"
8992
local upload = require "resty.upload"
9093

@@ -130,9 +133,10 @@ You can use the [lua-resty-string](https://github.com/agentzh/lua-resty-string)
130133
-- do nothing
131134
end
132135
end
136+
```
133137

134138
If you want to copmute MD5 sums for the uploaded files, just use the
135-
resty.md5 module shipped by the lua-resty-string library. It has
139+
resty.md5 module shipped by the [lua-resty-string](https://github.com/agentzh/lua-resty-string) library. It has
136140
a similar API as resty.sha1.
137141

138142
For big file uploading, it is important not to buffer all the data in memory.

0 commit comments

Comments
 (0)