ClaudioZandonella / trackdown

R package for collaborative writing and editing of R Markdown (or Sweave) documents in Google Docs.
https://ClaudioZandonella.github.io/trackdown/
GNU General Public License v3.0
214 stars 15 forks source link

[BUG?] Can not upload file without YAML header #22

Closed Dobrokhotov1989 closed 2 years ago

Dobrokhotov1989 commented 2 years ago

Hi,

I have a problem uploading a child Rmd file that does not contain YAML header. Specifically upload_file() returns error "Error: There are some issues in the identification of YAML start/end line indexes" when hide_code = TRUE. Upload works just fine if hide_code = FALSE or with empty YAML header.

I'm not sure whether it is a really bug or it's kinda "safety feature" that you need to preserve.

ClaudioZandonella commented 2 years ago

Hi @Dobrokhotov1989!

Thanks for reporting this problem. I would say it is a "Black Swan Fallacy". When developing the code I thought "All Rmd documents have a YAML header" but I was wrong, child Rmd files exist😅...

Actually, there are no safety reasons behind this so I will make the required changes to allow uploading documents without YAML header as well. I need only to do some checks. In a few days, I will update everything!

Thanks again!

ClaudioZandonella commented 2 years ago

Hi @Dobrokhotov1989,

sorry for the long time it took me to fix this. Now child files are supported and the argument hide_code = TRUE can be used regardless of whether the file contains header code and/or chunks or not. So everything should be fine.

Changes are in the new version of the package (v 1.1.0). The new version is still in the develop branch (I could not yet merge changes in the master branch due to some issues in the Github actions). You can install it by,

remotes::install_github("ClaudioZandonella/trackdown", ref = "develop")

Shortly I will merge changes in the master branch and upgrade the CRAN version as well.

Again thank you for helping to improve the package!❤️