{"action":"created","issue":{"url":"https://api.github.com/repos/hadley/staticdocs/issues/136","repository_url":"https://api.github.com/repos/hadley/staticdocs","labels_url":"https://api.github.com/repos/hadley/staticdocs/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/hadley/staticdocs/issues/136/comments","events_url":"https://api.github.com/repos/hadley/staticdocs/issues/136/events","html_url":"https://github.com/hadley/staticdocs/issues/136","id":175093152,"number":136,"title":"Functions created and used in examples are mistaken for exported functions","user":{"login":"bborgesr","id":6527540,"avatar_url":"https://avatars.githubusercontent.com/u/6527540?v=3","gravatar_id":"","url":"https://api.github.com/users/bborgesr","html_url":"https://github.com/bborgesr","followers_url":"https://api.github.com/users/bborgesr/followers","following_url":"https://api.github.com/users/bborgesr/following{/other_user}","gists_url":"https://api.github.com/users/bborgesr/gists{/gist_id}","starred_url":"https://api.github.com/users/bborgesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bborgesr/subscriptions","organizations_url":"https://api.github.com/users/bborgesr/orgs","repos_url":"https://api.github.com/users/bborgesr/repos","events_url":"https://api.github.com/users/bborgesr/events{/privacy}","received_events_url":"https://api.github.com/users/bborgesr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-05T15:27:28Z","updated_at":"2016-09-05T16:21:44Z","closed_at":null,"body":"As of right now, when you run staticdocs for the Shiny website, you get this type of input (partial):\r\n\r\n```\r\nGenerating reactiveValuesToList.html\r\nGenerating registerInputHandler.html\r\nGenerating removeInputHandler.html\r\nGenerating removeUI.html\r\nGenerating renderDataTable.html\r\nGenerating renderImage.html\r\nGenerating renderPlot.html\r\nGenerating renderPrint.html\r\nCan't find help topic 'visFun'\r\nCan't find help topic 'invisFun'\r\nCan't find help topic 'multiprintFun'\r\nCan't find help topic 'nullFun'\r\nCan't find help topic 'invisNullFun'\r\nCan't find help topic 'vecFun'\r\nCan't find help topic 'visFun'\r\nCan't find help topic 'invisFun'\r\nCan't find help topic 'multiprintFun'\r\nCan't find help topic 'nullFun'\r\nCan't find help topic 'invisNullFun'\r\nCan't find help topic 'vecFun'\r\nGenerating renderTable.html\r\nGenerating renderText.html\r\nCan't find help topic 'visFun'\r\nCan't find help topic 'invisFun'\r\nCan't find help topic 'multiprintFun'\r\nCan't find help topic 'nullFun'\r\nCan't find help topic 'invisNullFun'\r\nCan't find help topic 'vecFun'\r\nCan't find help topic 'visFun'\r\nCan't find help topic 'invisFun'\r\nCan't find help topic 'multiprintFun'\r\nCan't find help topic 'nullFun'\r\nCan't find help topic 'invisNullFun'\r\nCan't find help topic 'vecFun'\r\nGenerating renderUI.html\r\nGenerating repeatable.html\r\nCan't find help topic 'rnormA'\r\nCan't find help topic 'rnormA'\r\nCan't find help topic 'rnormA'\r\nCan't find help topic 'rnormB'\r\nGenerating req.html\r\nGenerating restoreInput.html\r\nGenerating runApp.html\r\nGenerating runExample.html\r\nGenerating runGadget.html\r\nGenerating runUrl.html\r\nGenerating safeError.html\r\nGenerating selectInput.html\r\nGenerating serverInfo.html\r\nGenerating session.html\r\nGenerating setBookmarkExclude.html\r\nGenerating shiny-options.html\r\nGenerating shiny-package.html\r\nGenerating shinyApp.html\r\nGenerating shinyDeprecated.html\r\nGenerating shinyOptions.html\r\n```\r\n\r\nAll of the functions that it says \"Can't find help topic ...\" are functions created and used in examples. I *think* this is somehow trying to generate help pages for functions created and used in examples - misreading them as exported functions? - (and failing since there's no documentation available). Obviously, we don't want these functions documented. While this doesn't seem to impact the final product (the website looks the same from the user's perspective), it does look like a bug...\r\n\r\nI traced it back to [this commit](https://github.com/hadley/staticdocs/commit/4c7139bde2dccc85aa1b7a0c8433f05af62cba6e), in particlar, [this line](https://github.com/hadley/staticdocs/blob/master/R/highlight.r#L5):\r\n\r\n```r\r\ntry(expr <- utils::getParseData(parse(text = text, keep.source = TRUE)))\r\n```\r\n\r\nIf we change the last argument to `keep.source = FALSE`, then everything works as expected:\r\n\r\n```r\r\nGenerating reactiveValuesToList.html\r\nGenerating registerInputHandler.html\r\nGenerating removeInputHandler.html\r\nGenerating removeUI.html\r\nGenerating renderDataTable.html\r\nGenerating renderImage.html\r\nGenerating renderPlot.html\r\nGenerating renderPrint.html\r\nGenerating renderTable.html\r\nGenerating renderText.html\r\nGenerating renderUI.html\r\nGenerating repeatable.html\r\nGenerating req.html\r\nGenerating restoreInput.html\r\nGenerating runApp.html\r\nGenerating runExample.html\r\nGenerating runGadget.html\r\nGenerating runUrl.html\r\nGenerating safeError.html\r\nGenerating selectInput.html\r\nGenerating serverInfo.html\r\nGenerating session.html\r\nGenerating setBookmarkExclude.html\r\nGenerating shiny-options.html\r\nGenerating shiny-package.html\r\nGenerating shinyApp.html\r\nGenerating shinyDeprecated.html\r\nGenerating shinyOptions.html\r\n```\r\n\r\nI don't quite understand the mechanism being used here (not super familiar with this part of the codebase)... Is there any reason why we'd ever want `keep.source = FALSE`. If not, the fix is obviously easy... But if there is a valid reason for that sometimes, maybe it should be an argument to `build_site`, or at the very least be left blank, so that the user can configure it using `options`, since the documentation for `parse` allows this: \r\n\r\n```r\r\nparse(file = \"\", n = NULL, text = NULL, prompt = \"?\",\r\n      keep.source = getOption(\"keep.source\"), srcfile,\r\n      encoding = \"unknown\")\r\n```"},"comment":{"url":"https://api.github.com/repos/hadley/staticdocs/issues/comments/244781028","html_url":"https://github.com/hadley/staticdocs/issues/136#issuecomment-244781028","issue_url":"https://api.github.com/repos/hadley/staticdocs/issues/136","id":244781028,"user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T16:21:44Z","updated_at":"2016-09-05T16:21:44Z","body":"You can just ignore the messages — they're because staticdocs tries to automatically link all function names in the docs to their corresponding doc page. Maybe I should just drop the message since it doesn't actually matter if that fails?"}}
{"actor":{"display_login":"hadley"}}