Render deprecated pragmas (#8886)

* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
This commit is contained in:
LemonBoy 2019-06-03 10:15:20 +02:00 • committed by Andreas Rumpf
commit 7d217a71d3
21 changed files with 180 additions and 117 deletions

View file

@ -239,8 +239,8 @@ proc getBiggestInt*(n: JsonNode, default: BiggestInt = 0): BiggestInt =
if n.isNil or n.kind != JInt: return default
else: return n.num
proc getNum*(n: JsonNode, default: BiggestInt = 0): BiggestInt {.deprecated: "use getInt or getBiggestInt instead".} =
## **Deprecated since v0.18.2:** use ``getInt`` or ``getBiggestInt`` instead.
proc getNum*(n: JsonNode, default: BiggestInt = 0): BiggestInt {.deprecated:
"Deprecated since v0.18.2; use 'getInt' or 'getBiggestInt' instead".} =
getBiggestInt(n, default)
proc getFloat*(n: JsonNode, default: float = 0.0): float =
@ -253,8 +253,8 @@ proc getFloat*(n: JsonNode, default: float = 0.0): float =
of JInt: return float(n.num)
else: return default
proc getFNum*(n: JsonNode, default: float = 0.0): float {.deprecated: "use getFloat instead".} =
## **Deprecated since v0.18.2:** use ``getFloat`` instead.
proc getFNum*(n: JsonNode, default: float = 0.0): float {.deprecated:
"Deprecated since v0.18.2; use 'getFloat' instead".} =
getFloat(n, default)
proc getBool*(n: JsonNode, default: bool = false): bool =
@ -264,8 +264,8 @@ proc getBool*(n: JsonNode, default: bool = false): bool =
if n.isNil or n.kind != JBool: return default
else: return n.bval
proc getBVal*(n: JsonNode, default: bool = false): bool {.deprecated: "use getBool instead".} =
## **Deprecated since v0.18.2:** use ``getBool`` instead.
proc getBVal*(n: JsonNode, default: bool = false): bool {.deprecated:
"Deprecated since v0.18.2; use 'getBool' instead".} =
getBool(n, default)
proc getFields*(n: JsonNode,
@ -511,8 +511,8 @@ proc contains*(node: JsonNode, val: JsonNode): bool =
assert(node.kind == JArray)
find(node.elems, val) >= 0
proc existsKey*(node: JsonNode, key: string): bool {.deprecated: "use hasKey instead".} = node.hasKey(key)
## **Deprecated:** use `hasKey` instead.
proc existsKey*(node: JsonNode, key: string): bool {.deprecated: "use 'hasKey' instead".} =
node.hasKey(key)
proc `{}`*(node: JsonNode, keys: varargs[string]): JsonNode =
## Traverses the node and gets the given value. If any of the