Problems with `bookdown:::preview_book()` when a change is made to `README.md`
If I am using bookdown:::preview_book() and make any change to README.md, rendering seems to go awry.
Two things happen:
-
Following new files are created:
_main.htmland_main.md -
Rendering starts to fail with the following error:
<simpleError in xml_children(x)[[search]]: subscript out of bounds>
Is this expected behaviour?
I don't think that is expected behavior. We should have a look a the watcher function which is supposed to update the preview. Maybe it is catching up on README.md where it should not as I believe not part of the book... 🤔
Also this is with bs4_book() right ?
It is possible that what I described above is true but never caused issue with gitbook() if the rendering function handled that better.
Just idea, I would need to create a dummy project to test this and dig into it. Are you interested in looking deeper and fix ? No problem if you're not, I'll do it when working on bookdown. Just if you do, that is helpful too ! 😉
Sorry for the late response, @cderv.
Also this is with
bs4_book()right ?
Yes, that is correct.
Are you interested in looking deeper and fix ?
Ideally, yes, but I am not sure if I can find time anytime soon. 😢 If I find time before you start working on bookdown again and manage to solve this, will definitely make a PR!