summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharles Blake <cblake@csail.mit.edu>2015-08-04 13:16:27 -0400
committerCharles Blake <cblake@csail.mit.edu>2015-08-04 13:16:27 -0400
commit0487ad418040b0512603ec7f640307ab34895400 (patch)
treea3b03adcd332faf78ac54fe4546d17d1a3b022ee
parentabf15ec6ceb99bed8bf79a1a7a566596d32097bc (diff)
downloadNim-0487ad418040b0512603ec7f640307ab34895400.tar.gz
Use hyperlinks to refer to other procs.
-rw-r--r--lib/pure/memfiles.nim14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/pure/memfiles.nim b/lib/pure/memfiles.nim
index a506d2c24..15fa4c65e 100644
--- a/lib/pure/memfiles.nim
+++ b/lib/pure/memfiles.nim
@@ -309,9 +309,10 @@ iterator memSlices*(mfile: MemFile, delim='\l', eat='\r'): MemSlice {.inline.} =
     remaining = mfile.size - (ms.data -! mfile.mem)
 
 iterator lines*(mfile: MemFile, buf: var TaintedString, delim='\l', eat='\r'): TaintedString {.inline.} =
-  ## Replace contents of passed buffer with each new line, like readLine(File).
-  ## `delim`, `eat`, and delimiting logic is exactly as for memSlices, but Nim
-  ## strings are returned.  Example:
+  ## Replace contents of passed buffer with each new line, like
+  ## `readLine(File) <system.html#readLine,File,TaintedString>`_.
+  ## `delim`, `eat`, and delimiting logic is exactly as for
+  ## `memSlices <#memSlices>`_, but Nim strings are returned.  Example:
   ##
   ## .. code-block:: nim
   ##   var buffer: TaintedString = ""
@@ -325,9 +326,10 @@ iterator lines*(mfile: MemFile, buf: var TaintedString, delim='\l', eat='\r'): T
     yield buf
 
 iterator lines*(mfile: MemFile, delim='\l', eat='\r'): TaintedString {.inline.} =
-  ## Return each line in a file as a Nim string, like lines(File).
-  ## `delim`, `eat`, and delimiting logic is exactly as for memSlices, but Nim
-  ## strings are returned.  Example:
+  ## Return each line in a file as a Nim string, like
+  ## `lines(File) <system.html#lines.i,File>`_.
+  ## `delim`, `eat`, and delimiting logic is exactly as for
+  ## `memSlices <#memSlices>`_, but Nim strings are returned.  Example:
   ##
   ## .. code-block:: nim
   ##   for line in lines(memfiles.open("foo")):