Software
Placeholder

downlit

Syntax Highlighting and Automatic Linking

R

downlit provides syntax highlighting and automatic linking for R code in documentation. It’s designed to work with RMarkdown packages like pkgdown, bookdown, and hugodown to turn code references into clickable links to documentation.

The package automatically links function calls, help topics, vignettes, and package names to their documentation, either on pkgdown sites or fallback sources like rdrr.io. It handles both multiline code blocks (with syntax highlighting and comment styling) and inline code references. Cross-package linking works by discovering pkgdown metadata, making it easy to create interconnected documentation across R packages.

Contributors