mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
Merge pull request #3926 from CORDEA/fix-uri-doc
Fixed an wrong example of the uri module doc.
This commit is contained in:
@@ -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] == '/':
|
||||
|
||||
Reference in New Issue
Block a user