mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 05:20:31 +00:00
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.
(cherry picked from commit 93461aee34)
This commit is contained in:
@@ -45,7 +45,7 @@ template assert*(cond: untyped, msg = "") =
|
||||
##
|
||||
## The compiler may not generate any code at all for ``assert`` if it is
|
||||
## advised to do so through the ``-d:release`` or ``--assertions:off``
|
||||
## `command line switches <nimc.html#command-line-switches>`_.
|
||||
## `command line switches <nimc.html#compiler-usage-command-line-switches>`_.
|
||||
const expr = astToStr(cond)
|
||||
assertImpl(cond, msg, expr, compileOption("assertions"))
|
||||
|
||||
|
||||
@@ -312,8 +312,8 @@ proc cd*(dir: string) {.raises: [OSError].} =
|
||||
##
|
||||
## The change is permanent for the rest of the execution, since this is just
|
||||
## a shortcut for `os.setCurrentDir()
|
||||
## <http://nim-lang.org/docs/os.html#setCurrentDir,string>`_ . Use the `withDir()
|
||||
## <#withDir>`_ template if you want to perform a temporary change only.
|
||||
## <os.html#setCurrentDir,string>`_ . Use the `withDir()
|
||||
## <#withDir.t,string,untyped>`_ template if you want to perform a temporary change only.
|
||||
setCurrentDir(dir)
|
||||
checkOsError()
|
||||
|
||||
@@ -326,7 +326,7 @@ proc findExe*(bin: string): string =
|
||||
template withDir*(dir: string; body: untyped): untyped =
|
||||
## Changes the current directory temporarily.
|
||||
##
|
||||
## If you need a permanent change, use the `cd() <#cd>`_ proc. Usage example:
|
||||
## If you need a permanent change, use the `cd() <#cd,string>`_ proc. Usage example:
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## withDir "foo":
|
||||
|
||||
Reference in New Issue
Block a user