jhelvy / renderthis

An R package for building xaringan slides into multiple outputs, including html, pdf, png, gif, pptx, and mp4.
https://jhelvy.github.io/renderthis
Other
174 stars 12 forks source link

fix: Don't convert .Rmd to .rmd #23

Closed datawookie closed 3 years ago

datawookie commented 3 years ago

Hi John,

Firstly, thanks for this package. It's a complete revelation. I've been building alternative formats of my slides by hand. The fact that there's a package that can do all of this simply and easily is going to make things do much easier.

I did run into a minor problem using the package though. I generally use the .Rmd file extension on my R Markdown files. I think that there's probably a split between .rmd and .Rmd in the community.

However, I found that {xaringanBuilder} was insisting on .rmd.

image

When I tried to process my .Rmd file it gave an error saying that the .rmd (lowercase) didn't exist. The weird thing was that when I changed the file extension to lowercase but ran the same command (with the .Rmd extension) it now worked. This felt a little inconsistent! :)

I've made a minor change: just dropping the like in which you explicitly set the extension of the input to .rmd. I think that this still works fine though since you have a check which asserts that the input file has the extension .rmd (the check is case insensitive since you convert to lowercase first).

I hope that you'll accept this minor contribution to your cool package.

Best regards, Andrew.

jhelvy commented 3 years ago

Hi Andrew, thanks for the praise - glad you're finding the package useful!

I think this works as each build function checks the input extensions anyway, and as you noted those checks are case insensitive, so leaving the input_rmd as just the input_root should work whether the user uses rmd or Rmd.