diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-06-02 09:02:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 09:02:14 -0700 |
commit | 0de3d4292f328f94c7a94af7e3e61e58ff43a252 (patch) | |
tree | 829525610f60acb1fb4461385532d197cc077301 /nimdoc/testproject/subdir/subdir_b | |
parent | 4ee6eddad4a43e1ba6104e091f221f6295aece64 (diff) | |
download | Nim-0de3d4292f328f94c7a94af7e3e61e58ff43a252.tar.gz |
fix #16993, #18054, #17835 runnableExamples now works with templates and nested templates (#18082)
Diffstat (limited to 'nimdoc/testproject/subdir/subdir_b')
-rw-r--r-- | nimdoc/testproject/subdir/subdir_b/utils.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nimdoc/testproject/subdir/subdir_b/utils.nim b/nimdoc/testproject/subdir/subdir_b/utils.nim index 128e8e481..4e3aa1f10 100644 --- a/nimdoc/testproject/subdir/subdir_b/utils.nim +++ b/nimdoc/testproject/subdir/subdir_b/utils.nim @@ -50,9 +50,9 @@ template bEnum*(): untyped = discard template fromUtilsGen*(): untyped = - ## this should be shown in utils.html + ## should be shown in utils.html only runnableExamples: - assert 3*2 == 6 + discard "should be in utils.html only, not in module that calls fromUtilsGen" ## ditto iterator fromUtils1*(): int = @@ -64,7 +64,11 @@ template fromUtilsGen*(): untyped = template fromUtils2*() = ## ok3 + runnableExamples: + discard """should be shown as examples for fromUtils2 + in module calling fromUtilsGen""" proc fromUtils3*() = ## came form utils but should be shown where `fromUtilsGen` is called - runnableExamples: discard 1 + runnableExamples: discard """should be shown as examples for fromUtils3 + in module calling fromUtilsGen""" |