Skip to content

Conversation

@knuesel
Copy link
Contributor

@knuesel knuesel commented Jan 26, 2021

Without this PR, a doctest such as

```jldoctest
nothing
# output
```

results in a BoundsError exception:

ERROR: LoadError: BoundsError: attempt to access 1-element Array{SubString{String},1} at index [2]
Stacktrace:
 [1] getindex at ./array.jl:809 [inlined]
 [2] indexed_iterate at ./tuple.jl:82 [inlined]
 [3] eval_script(::Documenter.DocTests.MutableMD2CodeBlock, ::Module, ::Dict{Symbol,Any}, ::Documenter.Documents.Document, ::String) at /home/j/.julia/packages/Documenter/b3ri2/src/DocTests.jl:242
...

@fredrikekre
Copy link
Member

fredrikekre commented Jan 26, 2021

```jldoctest
nothing
# output

```

Still works I believe, but no reason to not support it without the extra empty line.

@knuesel
Copy link
Contributor Author

knuesel commented Jan 26, 2021

Yes with an empty line it works already (but the doc says that "the amount of whitespace appearing above and below the # output line is not significant").

@mortenpi mortenpi added this to the 0.26.2 milestone Feb 2, 2021
Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants