change some code-blocks to runnableExamples and correct some errors in docs (#15900)

* original docs are wrong
* fix pathnorm
* Update lib/pure/pathnorm.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
This commit is contained in:
flywind 2020-11-12 17:47:56 +08:00 • committed by GitHub
commit ef2677f5f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 57 deletions

View file

@ -262,11 +262,8 @@ func contains*(methods: set[HttpMethod], x: string): bool =
func `$`*(code: HttpCode): string =
## Converts the specified ``HttpCode`` into a HTTP status.
##
## For example:
##
## .. code-block:: nim
## doAssert($Http404 == "404 Not Found")
runnableExamples:
doAssert($Http404 == "404 Not Found")
case code.int
of 100: "100 Continue"
of 101: "101 Switching Protocols"