diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/packages/docutils/rstgen.nim | 8 | ||||
-rw-r--r-- | lib/pure/collections/sequtils.nim | 4 | ||||
-rw-r--r-- | lib/pure/fenv.nim | 2 | ||||
-rw-r--r-- | lib/system.nim | 5 |
4 files changed, 11 insertions, 8 deletions
diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim index cfbc4a708..50246f2e0 100644 --- a/lib/packages/docutils/rstgen.nim +++ b/lib/packages/docutils/rstgen.nim @@ -728,9 +728,9 @@ proc renderTocEntry(d: PDoc, e: TTocEntry, result: var string) = "\\item\\label{$1_toc} $2\\ref{$1}\n", [e.refname, e.header]) proc renderTocEntries*(d: var TRstGenerator, j: var int, lvl: int, - result: var string) = + result: var string) = var tmp = "" - while j <= high(d.tocPart): + while j <= high(d.tocPart): var a = abs(d.tocPart[j].n.level) if a == lvl: renderTocEntry(d, d.tocPart[j], tmp) @@ -740,11 +740,11 @@ proc renderTocEntries*(d: var TRstGenerator, j: var int, lvl: int, else: break if lvl > 1: - dispA(d.target, result, "<ul class=\"simple\">$1</ul>", + dispA(d.target, result, "<ul class=\"simple\">$1</ul>", "\\begin{enumerate}$1\\end{enumerate}", [tmp]) else: result.add(tmp) - + proc renderImage(d: PDoc, n: PRstNode, result: var string) = var options = "" var s = getFieldValue(n, "scale") diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim index b824210a5..befc9bacb 100644 --- a/lib/pure/collections/sequtils.nim +++ b/lib/pure/collections/sequtils.nim @@ -302,6 +302,10 @@ template toSeq*(iter: expr): expr {.immediate.} = ## result = true) ## assert odd_numbers == @[1, 3, 5, 7, 9] ## + ## **Note**: Since this is an immediate macro, you cannot always invoke this + ## as ``x.toSeq``, depending on the ``x``. + ## See `this <manual.html#limitations-of-the-method-call-syntax>`_ + ## for an explanation. var result {.gensym.}: seq[type(iter)] = @[] for x in iter: add(result, x) result diff --git a/lib/pure/fenv.nim b/lib/pure/fenv.nim index 1859f7be7..415ef455e 100644 --- a/lib/pure/fenv.nim +++ b/lib/pure/fenv.nim @@ -8,7 +8,7 @@ # ## Floating-point environment. Handling of floating-point rounding and -## exceptions (overflow, zero-devide, etc.). +## exceptions (overflow, division by zero, etc.). {.deadCodeElim:on.} diff --git a/lib/system.nim b/lib/system.nim index 59a10f7e8..f268889d6 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -904,9 +904,8 @@ proc `of` *[T, S](x: T, y: S): bool {.magic: "Of", noSideEffect.} ## Checks if `x` has a type of `y` ## ## .. code-block:: Nim - ## assert(EFloatingPoint of EBase) - ## assert(EIO of ESystem) - ## assert(EDivByZero of EBase) + ## assert(FloatingPointError of Exception) + ## assert(DivByZeroError of Exception) proc cmp*[T](x, y: T): int {.procvar.} = ## Generic compare proc. Returns a value < 0 iff x < y, a value > 0 iff x > y |