summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-21 07:44:32 -0800
committerGitHub <noreply@github.com>2021-02-21 23:44:32 +0800
commit4f10dde64a504d982ef0e1d46e42f506a9a88a1b (patch)
treec3e3e67dc3e2ba1ffc063e8305fb3313a56cce34
parent6b7a6f8c546b8ab98d9cfe89e6bcd066c9037701 (diff)
downloadNim-4f10dde64a504d982ef0e1d46e42f506a9a88a1b.tar.gz
followup #17077: also use assert instead of doAssert for `code-block` rst blocks intended to be used as `runnableExamples` (#17122)
-rw-r--r--doc/contributing.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/contributing.rst b/doc/contributing.rst
index ac7657de7..e6301faae 100644
--- a/doc/contributing.rst
+++ b/doc/contributing.rst
@@ -344,7 +344,8 @@ tests so they'll be enabled even with `--assertions:off`.
     doAssert foo() # preferred
 
 .. _runnableExamples_use_assert:
-An exception to the above rule is `runnableExamples`, which for brevity use `assert`
+An exception to the above rule is `runnableExamples` and `code-block` rst blocks
+intended to be used as `runnableExamples`, which for brevity use `assert`
 instead of `doAssert`. Note that `nim doc -d:danger main` won't pass `-d:danger` to the
 `runnableExamples`, but `nim doc --doccmd:-d:danger main` would, and so would the
 second example below: