Skip to content

Commit

Permalink
@debug the next REPL line before evaling it (#2179)
Browse files Browse the repository at this point in the history
  • Loading branch information
musoke authored Jul 13, 2023
1 parent 7c97a86 commit b9f8c61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DocTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,12 @@ mutable struct Result
end

function eval_repl(block, sandbox, meta::Dict, doc::Documenter.Document, page)
src_lines = Documenter.find_block_in_file(block.code, meta[:CurrentFile])
for (input, output) in repl_splitter(block.code)
result = Result(block, input, output, meta[:CurrentFile])
for (ex, str) in Documenter.parseblock(input, doc, page; keywords = false, raise=false)
# Input containing a semi-colon gets suppressed in the final output.
@debug "Evaluating REPL line from doctest at $(Documenter.locrepr(result.file, src_lines))" unparsed_string = str parsed_expression = ex
result.hide = REPL.ends_with_semicolon(str)
# Use the REPL softscope for REPL jldoctests,
# see https://github.com/JuliaLang/julia/pull/33864
Expand Down

0 comments on commit b9f8c61

Please sign in to comment.