pbs-assess / csasdown

:book: An R package for creating CSAS reports in PDF or Word format with R Markdown and bookdown
Other
47 stars 17 forks source link

turning off line numbers crashes the knit #240

Closed SOLV-Code closed 1 year ago

SOLV-Code commented 1 year ago

Describe the bug

Documents render fine with line_nums: true, but crash with line_nums: false.

To Reproduce

  1. Run `csasdown::draft("resdoc")
  2. Go to line 52 in file index.Rmd and change line_nums: true to line_nums: false.
  3. Knit the document.
  4. The error message is:
Error in update_csasstyle(copy = copy_sty, line_nums = line_nums, line_nums_mod = line_nums_mod,  : 
  object 'csas_style' not found
Calls: <Anonymous> ... <Anonymous> -> update_csasstyle -> grep -> is.factor
Execution halted

Desktop (please complete the following information):

seananderson commented 1 year ago

Can you try reinstalling csasdown, restarting the R session, making sure copy_sty: true, and trying again? I can't reproduce this. I just pushed a tiny change, but I don't think that was related to this. It looks to me like it couldn't access or find the 'csas-style' folder within 'inst' in the installed package.

SOLV-Code commented 1 year ago

Will do, but just did a re-install. If it doesn't happen on your end, then it must be something weird with my install. Will try to get everything up to date and try again.

Thank you for testing this so quickly. Now that I know the problem is on my end, I should be able to track down the issue. If it doesn't resolve after a few tries, I'll just switch to a Docker container...

seananderson commented 1 year ago

See this other issue: https://github.com/pbs-assess/csasdown/issues/241 It's fixed now.

SOLV-Code commented 1 year ago

Awesome, thank you!