summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2022-09-01 02:39:02 +0300
committerGitHub <noreply@github.com>2022-08-31 19:39:02 -0400
commit0f555110e6dc54b5564c1c8e5c77b67631588f59 (patch)
tree182927647c9fbf327753cc94f0fb8592982b0697 /compiler
parentfb2773411eb591d652885f6fc63b2a6cf2cb01c9 (diff)
downloadNim-0f555110e6dc54b5564c1c8e5c77b67631588f59.tar.gz
Markdown code blocks part 6 (#20292)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/astalgo.nim5
-rw-r--r--compiler/sigmatch.nim5
-rw-r--r--compiler/vmgen.nim9
3 files changed, 8 insertions, 11 deletions
diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim
index 22f4257fc..d0e30dfb6 100644
--- a/compiler/astalgo.nim
+++ b/compiler/astalgo.nim
@@ -227,11 +227,10 @@ proc getNamedParamFromList*(list: PNode, ident: PIdent): PSym =
   ## Named parameters are special because a named parameter can be
   ## gensym'ed and then they have '\`<number>' suffix that we need to
   ## ignore, see compiler / evaltempl.nim, snippet:
-  ##
-  ## .. code-block:: nim
-  ##
+  ##   ```
   ##   result.add newIdentNode(getIdent(c.ic, x.name.s & "\`gensym" & $x.id),
   ##            if c.instLines: actual.info else: templ.info)
+  ##   ```
   for i in 1..<list.len:
     let it = list[i].sym
     if it.name.id == ident.id or
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 760ee697d..290b9c8db 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -550,11 +550,10 @@ proc inconsistentVarTypes(f, a: PType): bool {.inline.} =
 
 proc procParamTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
   ## For example we have:
-  ##
-  ## .. code-block:: nim
+  ##   ```
   ##   proc myMap[T,S](sIn: seq[T], f: proc(x: T): S): seq[S] = ...
   ##   proc innerProc[Q,W](q: Q): W = ...
-  ##
+  ##   ```
   ## And we want to match: myMap(@[1,2,3], innerProc)
   ## This proc (procParamTypeRel) will do the following steps in
   ## three different calls:
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 554b048e6..f15cb2752 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -15,11 +15,10 @@
 #   this doesn't matter. However it matters for strings and other complex
 #   types that use the 'node' field; the reason is that slots are
 #   re-used in a register based VM. Example:
-#
-#.. code-block:: nim
-#   let s = a & b  # no matter what, create fresh node
-#   s = a & b  # no matter what, keep the node
-#
+#     ```nim
+#     let s = a & b  # no matter what, create fresh node
+#     s = a & b  # no matter what, keep the node
+#     ```
 # Also *stores* into non-temporary memory need to perform deep copies:
 # a.b = x.y
 # We used to generate opcAsgn for the *load* of 'x.y' but this is clearly