Bug fix: eval=false was excluding code from output

pull/21/head
Matti Pastell 2014-12-09 11:33:30 +02:00
parent 3c9398e711
commit 9e5f7cb1c2
3 changed files with 7 additions and 7 deletions

View File

@ -14,11 +14,6 @@ and Sweave.
* Capture PyPlot, Gadfly or Winston figures.
* Supports LaTex, Pandoc and Github markdown and reStructuredText output
**Not implemented**
* Script reader
* Inline code
* Caching
## Chunk options

View File

@ -182,7 +182,12 @@ function run(parsed)
merge!(chunk, options)
delete!(chunk, :options)
chunk[:eval] || (chunk[:result] = ""; continue) #Do nothing if eval is false
if !chunk[:eval]
chunk[:result] = ""
parsed[i] = copy(chunk)
i += 1
continue #Do nothing if eval is false
end
report.fignum = 1
report.cur_result = ""

View File

@ -56,7 +56,7 @@ function format_codechunk(chunk, formatdict)
if !chunk[:eval]
if chunk[:echo]
result = "$(formatdict[:codestart])$(chunk[:content])$(formatdict[:codeend])"
result = "$(formatdict[:codestart])$(chunk[:content])\n$(formatdict[:codeend])"
return result
else
r = ""