-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formatting in-line code #5
Comments
From this SO post:
|
Sorry for the delay on this. It was always through my list so going back to it now as doing some cleaning in relation rmarkdown and bookdown
I am not sure about the error you had. Trying your demo repo (thanks) seems to work with these adjusments:
```{r inline, include = FALSE}
local({
hook_inline <- knitr::knit_hooks$get('inline')
knitr::knit_hooks$set(
inline = function(x) {
if (is.character(x) & knitr::is_html_output()) {
paste0(
"<code>",
highr::hi_html(x),
"</code>"
)
} else {
hook_inline(x)
}
}
)
})
``` adding
So there would be some adjustment to make to get that working. Also using There is `r nrow(data)` line in the table I believe nowadays downlit would simplify this - or could if it can't already. is this still something you want to do ? downlit support for gitbook() is still a thing to do : rstudio/bookdown#844 At last, regarding bookdown project, the hook being applied may depend on where it is set according to the settings used ( Anyway, it was a long overdue digging through. Sorry for the wait. |
This SO question doesn't appear to work anymore. I tried this but errors were produced:
The text was updated successfully, but these errors were encountered: