Update file reading for content modification#20
Update file reading for content modification#20kweav merged 2 commits intoacoffman/borrow-chapter-token-fixfrom
Conversation
Change file reading from doc_path to dest_file before processing to attempt to fix error identified while testing this branch
|
This is working, but there are header warnings on the top of the borrowed content: @acoffman @carriewright11 any idea what I need to do to suppress those warnings? Looking into the quarto website one because that is not private material and it worked, so I'm going to inspect the test more closely |
|
@kweav The warnings about |
|
@kweav I pushed a commit to the original PR that hides the warning coming from |
…l-borrow-chapter-fix
|
Thanks @acoffman -- Warnings are gone now! And I can confirm that ottrpal borrow chapter works for
test 1: website, qmd, outside jhudsl/fhdsl: test2: course, Rmd, within jhudsl: good to merge this and #19 @carriewright11? |


Change file reading from doc_path to dest_file before processing to attempt to fix error identified while testing this branch
While testing the changes in this branch, I encountered a new issue with the readLines function. Comparing to the original function, I see a different variable was used.
How I tested this branch:
-- used this branch specifically for ottrpal within the base_ottr dockerfile, building it and pushing it to dockerhub with the testBC tag.
-- Used that image on a few repos and called ottrpal borrow_chapter to test rendering/borrowing a chapter
Error I observed:
-- the error acted like the file didn't exist. But that seems to be because it was looking for a local file which indeed did not exist.
How this should fix it:
-- updating it to look at the full path, not a local path, trying to mirror the original code (https://github.com/jhudsl/cow/blob/be112c8bb9c6ddb9c3b5668a7dd2faa1042281e9/R/borrow_chapter.R#L108)