summary refs log tree commit diff stats
path: root/lib/pure/collections
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2019-10-24 14:07:43 +0200
committerGitHub <noreply@github.com>2019-10-24 14:07:43 +0200
commitb03de8a4d9926b03da2ed5cd8cde16ab22d31a97 (patch)
tree2a80fbc34c36041de93afe2b4617556ad741b3d8 /lib/pure/collections
parent8f8916413f4ea902ec2718a12ad71a37a5331cc1 (diff)
parent3ad48069d37d42cc56e48399bb429dc50416e556 (diff)
downloadNim-b03de8a4d9926b03da2ed5cd8cde16ab22d31a97.tar.gz
Fix many broken links and prefer relative links within docs (#12463)
* Fix many broken links

Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.

* Prefer relative links for Nim documentation

This is more friendly to those browsing the documentation without
a network connection. The nim-doc package in Debian allows this,
for example.

Also, the domain name being used was not consistent. It could have
been either nim-lang.org or nim-lang.github.io, and those reading
the stable docs could have found themselves suddenly reading the
devel docs instead.

* koch.rst: remove link to nonexistent section

* manual.rst: remove unintended link

cast[T](0) is interpreted as a link to id 0 with text T, so escape
the opening parentheses to display the intended output.

* asyncstreams: replace unintended link with emphasis

* Fix word wrapping
Diffstat (limited to 'lib/pure/collections')
-rw-r--r--lib/pure/collections/lists.nim4
-rw-r--r--lib/pure/collections/sequtils.nim2
-rw-r--r--lib/pure/collections/sets.nim8
-rw-r--r--lib/pure/collections/tables.nim5
4 files changed, 10 insertions, 9 deletions
diff --git a/lib/pure/collections/lists.nim b/lib/pure/collections/lists.nim
index 4118290b6..b95cfffc0 100644
--- a/lib/pure/collections/lists.nim
+++ b/lib/pure/collections/lists.nim
@@ -69,8 +69,8 @@
 ## See also
 ## ========
 ##
-## * `deques module <#deques.html>`_ for double-ended queues
-## * `sharedlist module <#sharedlist.html>`_ for shared singly-linked lists
+## * `deques module <deques.html>`_ for double-ended queues
+## * `sharedlist module <sharedlist.html>`_ for shared singly-linked lists
 
 
 when not defined(nimhygiene):
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index 00bb0300d..9ea8c44f7 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -35,7 +35,7 @@
 ##   `filterIt<#filterIt.t,untyped,untyped>`_, etc.)
 ##
 ## The chaining of functions is possible thanks to the
-## `method call syntax<manual.html#procs-method-call-syntax>`_.
+## `method call syntax<manual.html#procedures-method-call-syntax>`_.
 ##
 ## .. code-block::
 ##   import sequtils, sugar
diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim
index 4b896b12b..930b7f0ed 100644
--- a/lib/pure/collections/sets.nim
+++ b/lib/pure/collections/sets.nim
@@ -99,8 +99,8 @@ proc init*[A](s: var HashSet[A], initialSize = defaultInitialSize) =
   ##
   ## The `initialSize` parameter needs to be a power of two (default: 64).
   ## If you need to accept runtime values for this, you can use
-  ## `math.nextPowerOfTwo proc <math.html#nextPowerOfTwo>`_ or `rightSize proc
-  ## <#rightSize,Natural>`_ from this module.
+  ## `math.nextPowerOfTwo proc <math.html#nextPowerOfTwo,int>`_ or
+  ## `rightSize proc <#rightSize,Natural>`_ from this module.
   ##
   ## Starting from Nim v0.20, sets are initialized by default and it is
   ## not necessary to call this function explicitly.
@@ -645,8 +645,8 @@ proc init*[A](s: var OrderedSet[A], initialSize = defaultInitialSize) =
   ##
   ## The `initialSize` parameter needs to be a power of two (default: 64).
   ## If you need to accept runtime values for this, you can use
-  ## `math.nextPowerOfTwo proc <math.html#nextPowerOfTwo>`_ or `rightSize proc
-  ## <#rightSize,Natural>`_ from this module.
+  ## `math.nextPowerOfTwo proc <math.html#nextPowerOfTwo,int>`_ or
+  ## `rightSize proc <#rightSize,Natural>`_ from this module.
   ##
   ## Starting from Nim v0.20, sets are initialized by default and it is
   ## not necessary to call this function explicitly.
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index 3c91ba9c7..7d1633e7d 100644
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -134,7 +134,8 @@
 ##   # 'a': 5, 'b': 2, 'c': 1, 'd': 1, 'r': 2}
 ##
 ## The same could have been achieved by manually iterating over a container
-## and increasing each key's value with `inc proc<#inc,CountTable[A],A,int>`_:
+## and increasing each key's value with `inc proc
+## <#inc,CountTable[A],A,Positive>`_:
 ##
 ## .. code-block::
 ##   import tables
@@ -2236,7 +2237,7 @@ proc `[]=`*[A](t: var CountTable[A], key: A, val: int) =
   ##
   ## See also:
   ## * `[] proc<#[],CountTable[A],A>`_ for retrieving a value of a key
-  ## * `inc proc<#inc,CountTable[A],A,int>`_ for incrementing a
+  ## * `inc proc<#inc,CountTable[A],A,Positive>`_ for incrementing a
   ##   value of a key
   assert(not t.isSorted, "CountTable must not be used after sorting")
   assert val >= 0