preserve rmarkdown v1 new doc template codepath