only restore default output hooks on exit of knit(); other hooks will be preserved
when child is not NULL and eval=FALSE, immediately return ''
cosmetic
move ref.chunk out from parse_chunk() to be an argument
n is not used anywhere, so do not need to create it
comment out code in purl() when eval=FALSE
assign params$eval to ev