diff options
author | ee7 <45465154+ee7@users.noreply.github.com> | 2020-06-22 08:12:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 08:12:50 +0200 |
commit | 1e484ed62b499432883575e6b29c930874377d7a (patch) | |
tree | d51af865ce6a624eea3575db01b80f2a2b8feb7a | |
parent | 1ffe1134501210e23e71e0f23099c2005edd98c9 (diff) | |
download | Nim-1e484ed62b499432883575e6b29c930874377d7a.tar.gz |
[backport] Docs: Fix broken `code-block` (#14749)
This commit indents the contents of a `code-block` in `httpclient.nim` so that it displays correctly. The bug was introduced by 42a64245f8. I did a quick search for other `code-block`s that are broken in the same way, but the only other one I found (in `pegs.nim`) is not included in the generated documentation.
-rw-r--r-- | lib/pure/httpclient.nim | 10 | ||||
-rw-r--r-- | lib/pure/pegs.nim | 40 |
2 files changed, 25 insertions, 25 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index dfd4abea5..92e4cd2d6 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -25,13 +25,13 @@ ## ``AsyncHttpClient``: ## ## .. code-block:: Nim -## import asyncdispatch, httpclient +## import asyncdispatch, httpclient ## -## proc asyncProc(): Future[string] {.async.} = -## var client = newAsyncHttpClient() -## return await client.getContent("http://example.com") +## proc asyncProc(): Future[string] {.async.} = +## var client = newAsyncHttpClient() +## return await client.getContent("http://example.com") ## -## echo waitFor asyncProc() +## echo waitFor asyncProc() ## ## The functionality implemented by ``HttpClient`` and ``AsyncHttpClient`` ## is the same, so you can use whichever one suits you best in the examples diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 946891420..8abd3deb5 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -870,26 +870,26 @@ macro mkHandlerTplts(handlers: untyped): untyped = # The AST structure of *handlers[0]*: # # .. code-block:: - # StmtList - # Call - # Ident "pkNonTerminal" - # StmtList - # Call - # Ident "enter" - # StmtList - # <handler code block> - # Call - # Ident "leave" - # StmtList - # <handler code block> - # Call - # Ident "pkChar" - # StmtList - # Call - # Ident "leave" - # StmtList - # <handler code block> - # ... + # StmtList + # Call + # Ident "pkNonTerminal" + # StmtList + # Call + # Ident "enter" + # StmtList + # <handler code block> + # Call + # Ident "leave" + # StmtList + # <handler code block> + # Call + # Ident "pkChar" + # StmtList + # Call + # Ident "leave" + # StmtList + # <handler code block> + # ... proc mkEnter(hdName, body: NimNode): NimNode = template helper(hdName, body) {.dirty.} = template hdName(s, p, start) = |