Skip to content

Commit

Permalink
fix #886: skip keyword parsing for code-block parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Jan 23, 2019
1 parent 46abe28 commit 54f1ede
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Expanders.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function Selectors.runner(::Type{EvalBlocks}, x, page, doc)
sandbox = Module(:EvalBlockSandbox)
cd(dirname(page.build)) do
result = nothing
for (ex, str) in Utilities.parseblock(x.code, doc, page)
for (ex, str) in Utilities.parseblock(x.code, doc, page; keywords = false)
try
result = Core.eval(sandbox, ex)
catch err
Expand Down Expand Up @@ -484,7 +484,7 @@ function Selectors.runner(::Type{ExampleBlocks}, x, page, doc)
else
code = x.code
end
for (ex, str) in Utilities.parseblock(code, doc, page)
for (ex, str) in Utilities.parseblock(code, doc, page; keywords = false)
(value, success, backtrace, text) = Utilities.withoutput() do
cd(dirname(page.build)) do
Core.eval(mod, Expr(:(=), :ans, ex))
Expand Down Expand Up @@ -542,7 +542,7 @@ function Selectors.runner(::Type{REPLBlocks}, x, page, doc)
mod = get!(() -> get_new_sandbox(sym), page.globals.meta, sym)
code = split(x.code, '\n'; limit = 2)[end]
result, out = nothing, IOBuffer()
for (ex, str) in Utilities.parseblock(x.code, doc, page)
for (ex, str) in Utilities.parseblock(x.code, doc, page; keywords = false)
buffer = IOBuffer()
input = droplines(str)
(value, success, backtrace, text) = Utilities.withoutput() do
Expand Down

0 comments on commit 54f1ede

Please sign in to comment.