summary refs log tree commit diff stats
path: root/lib/pure/includes
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2021-11-08 15:10:01 +0300
committerGitHub <noreply@github.com>2021-11-08 13:10:01 +0100
commitb21eb1ed36aa068cc9b0a304742e4c81b5112304 (patch)
tree87893c2032b57e89eaea898617f861d35312de2b /lib/pure/includes
parentb423ab138f41c24db3b168fd30f1ecce7850a170 (diff)
downloadNim-b21eb1ed36aa068cc9b0a304742e4c81b5112304.tar.gz
change os.nim doc links to new style (#19102)
Diffstat (limited to 'lib/pure/includes')
-rw-r--r--lib/pure/includes/osenv.nim42
-rw-r--r--lib/pure/includes/oserr.nim21
-rw-r--r--lib/pure/includes/osseps.nim6
3 files changed, 34 insertions, 35 deletions
diff --git a/lib/pure/includes/osenv.nim b/lib/pure/includes/osenv.nim
index 00a82327c..1a01ab9bc 100644
--- a/lib/pure/includes/osenv.nim
+++ b/lib/pure/includes/osenv.nim
@@ -56,13 +56,13 @@ when not defined(nimscript):
       ##
       ## If the variable does not exist, `""` is returned. To distinguish
       ## whether a variable exists or it's value is just `""`, call
-      ## `existsEnv(key) proc <#existsEnv,string>`_.
+      ## `existsEnv(key) proc`_.
       ##
       ## See also:
-      ## * `existsEnv proc <#existsEnv,string>`_
-      ## * `putEnv proc <#putEnv,string,string>`_
-      ## * `delEnv proc <#delEnv,string>`_
-      ## * `envPairs iterator <#envPairs.i>`_
+      ## * `existsEnv proc`_
+      ## * `putEnv proc`_
+      ## * `delEnv proc`_
+      ## * `envPairs iterator`_
       runnableExamples:
         assert getEnv("unknownEnv") == ""
         assert getEnv("unknownEnv", "doesn't exist") == "doesn't exist"
@@ -76,10 +76,10 @@ when not defined(nimscript):
       ## Returns true if it exists, false otherwise.
       ##
       ## See also:
-      ## * `getEnv proc <#getEnv,string,string>`_
-      ## * `putEnv proc <#putEnv,string,string>`_
-      ## * `delEnv proc <#delEnv,string>`_
-      ## * `envPairs iterator <#envPairs.i>`_
+      ## * `getEnv proc`_
+      ## * `putEnv proc`_
+      ## * `delEnv proc`_
+      ## * `envPairs iterator`_
       runnableExamples:
         assert not existsEnv("unknownEnv")
 
@@ -90,10 +90,10 @@ when not defined(nimscript):
       ## If an error occurs, `OSError` is raised.
       ##
       ## See also:
-      ## * `getEnv proc <#getEnv,string,string>`_
-      ## * `existsEnv proc <#existsEnv,string>`_
-      ## * `delEnv proc <#delEnv,string>`_
-      ## * `envPairs iterator <#envPairs.i>`_
+      ## * `getEnv proc`_
+      ## * `existsEnv proc`_
+      ## * `delEnv proc`_
+      ## * `envPairs iterator`_
       when defined(windows):
         if key.len == 0 or '=' in key:
           raise newException(OSError, "invalid key, got: " & $(key, val))
@@ -108,10 +108,10 @@ when not defined(nimscript):
       ## If an error occurs, `OSError` is raised.
       ##
       ## See also:ven
-      ## * `getEnv proc <#getEnv,string,string>`_
-      ## * `existsEnv proc <#existsEnv,string>`_
-      ## * `putEnv proc <#putEnv,string,string>`_
-      ## * `envPairs iterator <#envPairs.i>`_
+      ## * `getEnv proc`_
+      ## * `existsEnv proc`_
+      ## * `putEnv proc`_
+      ## * `envPairs iterator`_
       template bail = raiseOSError(osLastError(), key)
       when defined(windows):
         #[ 
@@ -190,10 +190,10 @@ iterator envPairs*(): tuple[key, value: string] {.tags: [ReadEnvEffect].} =
   ## in the second its value.
   ##
   ## Works in native backends, nodejs and vm, like the following APIs:
-  ## * `getEnv proc <#getEnv,string,string>`_
-  ## * `existsEnv proc <#existsEnv,string>`_
-  ## * `putEnv proc <#putEnv,string,string>`_
-  ## * `delEnv proc <#delEnv,string>`_
+  ## * `getEnv proc`_
+  ## * `existsEnv proc`_
+  ## * `putEnv proc`_
+  ## * `delEnv proc`_
   when nimvm:
     for ai in envPairsImplSeq(): yield ai
   else:
diff --git a/lib/pure/includes/oserr.nim b/lib/pure/includes/oserr.nim
index e42771d52..01403fa70 100644
--- a/lib/pure/includes/oserr.nim
+++ b/lib/pure/includes/oserr.nim
@@ -18,7 +18,7 @@ proc `$`*(err: OSErrorCode): string {.borrow.}
 proc osErrorMsg*(errorCode: OSErrorCode): string =
   ## Converts an OS error code into a human readable string.
   ##
-  ## The error code can be retrieved using the `osLastError proc <#osLastError>`_.
+  ## The error code can be retrieved using the `osLastError proc`_.
   ##
   ## If conversion fails, or `errorCode` is `0` then `""` will be
   ## returned.
@@ -28,8 +28,8 @@ proc osErrorMsg*(errorCode: OSErrorCode): string =
   ## message.
   ##
   ## See also:
-  ## * `raiseOSError proc <#raiseOSError,OSErrorCode,string>`_
-  ## * `osLastError proc <#osLastError>`_
+  ## * `raiseOSError proc`_
+  ## * `osLastError proc`_
   runnableExamples:
     when defined(linux):
       assert osErrorMsg(OSErrorCode(0)) == ""
@@ -63,18 +63,17 @@ proc newOSError*(
   ## Creates a new `OSError exception <system.html#OSError>`_.
   ##
   ## The `errorCode` will determine the
-  ## message, `osErrorMsg proc <#osErrorMsg,OSErrorCode>`_ will be used
+  ## message, `osErrorMsg proc`_ will be used
   ## to get this message.
   ##
-  ## The error code can be retrieved using the `osLastError proc
-  ## <#osLastError>`_.
+  ## The error code can be retrieved using the `osLastError proc`_.
   ##
   ## If the error code is `0` or an error message could not be retrieved,
   ## the message `unknown OS error` will be used.
   ##
   ## See also:
-  ## * `osErrorMsg proc <#osErrorMsg,OSErrorCode>`_
-  ## * `osLastError proc <#osLastError>`_
+  ## * `osErrorMsg proc`_
+  ## * `osLastError proc`_
   var e: owned(ref OSError); new(e)
   e.errorCode = errorCode.int32
   e.msg = osErrorMsg(errorCode)
@@ -90,7 +89,7 @@ proc newOSError*(
 proc raiseOSError*(errorCode: OSErrorCode, additionalInfo = "") {.noinline.} =
   ## Raises an `OSError exception <system.html#OSError>`_.
   ##
-  ## Read the description of the `newOSError proc <#newOSError,OSErrorCode,string>`_ to learn
+  ## Read the description of the `newOSError proc`_ to learn
   ## how the exception object is created.
   raise newOSError(errorCode, additionalInfo)
 
@@ -109,8 +108,8 @@ proc osLastError*(): OSErrorCode {.sideEffect.} =
   ##   immediately after an OS call fails. On POSIX systems this is not a problem.
   ##
   ## See also:
-  ## * `osErrorMsg proc <#osErrorMsg,OSErrorCode>`_
-  ## * `raiseOSError proc <#raiseOSError,OSErrorCode,string>`_
+  ## * `osErrorMsg proc`_
+  ## * `raiseOSError proc`_
   when defined(nimscript):
     discard
   elif defined(windows):
diff --git a/lib/pure/includes/osseps.nim b/lib/pure/includes/osseps.nim
index 10c85047b..1ea587e3c 100644
--- a/lib/pure/includes/osseps.nim
+++ b/lib/pure/includes/osseps.nim
@@ -37,9 +37,9 @@ const
     when doslikeFileSystem: '/'
     else: DirSep
     ## An alternative character used by the operating system to separate
-    ## pathname components, or the same as `DirSep <#DirSep>`_ if only one separator
+    ## pathname components, or the same as DirSep_ if only one separator
     ## character exists. This is set to `'/'` on Windows systems
-    ## where `DirSep <#DirSep>`_ is a backslash (`'\\'`).
+    ## where DirSep_ is a backslash (`'\\'`).
 
   PathSep* =
     when defined(macos) or defined(RISCOS): ','
@@ -55,7 +55,7 @@ const
          defined(PalmOS) or defined(MorphOS): false
     else: true
     ## True if the file system is case sensitive, false otherwise. Used by
-    ## `cmpPaths proc <#cmpPaths,string,string>`_ to compare filenames properly.
+    ## `cmpPaths proc`_ to compare filenames properly.
 
   ExeExt* =
     when doslikeFileSystem: "exe"