Merge pull request #3926 from CORDEA/fix-uri-doc
Fixed an wrong example of the uri module doc.
This commit is contained in:
commit
84cd3d9dc4
1 changed files with 3 additions and 3 deletions
|
|
@ -255,13 +255,13 @@ proc `/`*(x: Uri, path: string): Uri =
|
|||
## Examples:
|
||||
##
|
||||
## .. code-block::
|
||||
## let foo = parseUri("http://example.com/foo/bar") / parseUri("/baz")
|
||||
## let foo = parseUri("http://example.com/foo/bar") / "/baz"
|
||||
## assert foo.path == "/foo/bar/baz"
|
||||
##
|
||||
## let bar = parseUri("http://example.com/foo/bar") / parseUri("baz")
|
||||
## let bar = parseUri("http://example.com/foo/bar") / "baz"
|
||||
## assert bar.path == "/foo/bar/baz"
|
||||
##
|
||||
## let bar = parseUri("http://example.com/foo/bar/") / parseUri("baz")
|
||||
## let bar = parseUri("http://example.com/foo/bar/") / "baz"
|
||||
## assert bar.path == "/foo/bar/baz"
|
||||
result = x
|
||||
if result.path[result.path.len-1] == '/':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue