workbench
workbench copied to clipboard
"no applicable method for 'xml_find_first'" error with empty Markdown file
I stumbled into a cryptic error from {sandpaper} when trying to build a repository that included a Mardown file with no content:
Error in UseMethod("xml_find_first") :
no applicable method for 'xml_find_first' applied to an object of class "xml_document"
The error still occurs if the Markdown file includes YAML front matter, but no Markdown content. See a minimal example reproducing the error.
This probably should be an error, but it would be great if the error message was more informative e.g. stating the name of the file where the problem was encountered or even saying that the problem is that the page has no content. It took me a long time to work out what the problem was when I first encountered it.