add an edge case discovered in yihui/knitr#779