summary refs log tree commit diff stats
path: root/lib/pure/httpcore.nim
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-11-12 17:47:56 +0800
committerGitHub <noreply@github.com>2020-11-12 10:47:56 +0100
commitef2677f5f3f58ad5bd514f82a0efd68d4d17e7f9 (patch)
tree544de6e40861b41d151d5fb90b0c123cd37d5d0a /lib/pure/httpcore.nim
parent63c559e781cafaab6bcc9e62d5631e93749450bb (diff)
downloadNim-ef2677f5f3f58ad5bd514f82a0efd68d4d17e7f9.tar.gz
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>
Diffstat (limited to 'lib/pure/httpcore.nim')
-rw-r--r--lib/pure/httpcore.nim7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/pure/httpcore.nim b/lib/pure/httpcore.nim
index b3d1da8d6..401e78b9b 100644
--- a/lib/pure/httpcore.nim
+++ b/lib/pure/httpcore.nim
@@ -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"