Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/DocTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ function eval_script(block, sandbox, meta::Dict, doc::Documents.Document, page)
#
#
# to mark `input`/`output` separation.
input, output = split(block.code, "# output\n", limit = 2)

# Append "\n" before split in case of empty output
input, output = split(block.code*"\n", "# output\n", limit = 2)
input = rstrip(input, '\n')
output = lstrip(output, '\n')
result = Result(block, input, output, meta[:CurrentFile])
Expand Down
9 changes: 8 additions & 1 deletion test/doctests/src/working.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@ Comments at the start:
# .. should be ignored.
julia> 2 + 2
4
```
```

Empty output:

```jldoctest
nothing
# output
```