[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.
This commit is contained in:
parent
1ffe113450
commit
1e484ed62b
2 changed files with 25 additions and 25 deletions
|
|
@ -25,13 +25,13 @@
|
||||||
## ``AsyncHttpClient``:
|
## ``AsyncHttpClient``:
|
||||||
##
|
##
|
||||||
## .. code-block:: Nim
|
## .. code-block:: Nim
|
||||||
## import asyncdispatch, httpclient
|
## import asyncdispatch, httpclient
|
||||||
##
|
##
|
||||||
## proc asyncProc(): Future[string] {.async.} =
|
## proc asyncProc(): Future[string] {.async.} =
|
||||||
## var client = newAsyncHttpClient()
|
## var client = newAsyncHttpClient()
|
||||||
## return await client.getContent("http://example.com")
|
## return await client.getContent("http://example.com")
|
||||||
##
|
##
|
||||||
## echo waitFor asyncProc()
|
## echo waitFor asyncProc()
|
||||||
##
|
##
|
||||||
## The functionality implemented by ``HttpClient`` and ``AsyncHttpClient``
|
## The functionality implemented by ``HttpClient`` and ``AsyncHttpClient``
|
||||||
## is the same, so you can use whichever one suits you best in the examples
|
## is the same, so you can use whichever one suits you best in the examples
|
||||||
|
|
|
||||||
|
|
@ -870,26 +870,26 @@ macro mkHandlerTplts(handlers: untyped): untyped =
|
||||||
# The AST structure of *handlers[0]*:
|
# The AST structure of *handlers[0]*:
|
||||||
#
|
#
|
||||||
# .. code-block::
|
# .. code-block::
|
||||||
# StmtList
|
# StmtList
|
||||||
# Call
|
# Call
|
||||||
# Ident "pkNonTerminal"
|
# Ident "pkNonTerminal"
|
||||||
# StmtList
|
# StmtList
|
||||||
# Call
|
# Call
|
||||||
# Ident "enter"
|
# Ident "enter"
|
||||||
# StmtList
|
# StmtList
|
||||||
# <handler code block>
|
# <handler code block>
|
||||||
# Call
|
# Call
|
||||||
# Ident "leave"
|
# Ident "leave"
|
||||||
# StmtList
|
# StmtList
|
||||||
# <handler code block>
|
# <handler code block>
|
||||||
# Call
|
# Call
|
||||||
# Ident "pkChar"
|
# Ident "pkChar"
|
||||||
# StmtList
|
# StmtList
|
||||||
# Call
|
# Call
|
||||||
# Ident "leave"
|
# Ident "leave"
|
||||||
# StmtList
|
# StmtList
|
||||||
# <handler code block>
|
# <handler code block>
|
||||||
# ...
|
# ...
|
||||||
proc mkEnter(hdName, body: NimNode): NimNode =
|
proc mkEnter(hdName, body: NimNode): NimNode =
|
||||||
template helper(hdName, body) {.dirty.} =
|
template helper(hdName, body) {.dirty.} =
|
||||||
template hdName(s, p, start) =
|
template hdName(s, p, start) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue