From 4f10dde64a504d982ef0e1d46e42f506a9a88a1b Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sun, 21 Feb 2021 07:44:32 -0800 Subject: [PATCH] followup #17077: also use assert instead of doAssert for `code-block` rst blocks intended to be used as `runnableExamples` (#17122) --- doc/contributing.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: