Merge pull request #3926 from CORDEA/fix-uri-doc

Fixed an wrong example of the uri module doc.
This commit is contained in:
Dominik Picheta
2016-03-03 10:59:13 +00:00

View File

@@ -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] == '/':