Skip to content

Set R >=4.6.0's help.htmltocoption to FALSE#1307

Merged
DavisVaughan merged 1 commit into
mainfrom
fix/help-mangling-4-6
Jul 2, 2026
Merged

Set R >=4.6.0's help.htmltocoption to FALSE#1307
DavisVaughan merged 1 commit into
mainfrom
fix/help-mangling-4-6

Conversation

@DavisVaughan

Copy link
Copy Markdown
Contributor

Addresses posit-dev/positron#12840

Relevant R commits:

R 4.6.0 added a new help.htmltoc global option. The point of this was to help add a TOC on the left hand side of CRAN's new HTML page for R package docs: https://cran.r-project.org/web/packages/vctrs/refman/vctrs.html

It's on for "dynamic help", i.e. when you go through httpd() which calls Rd2HTML(dynamic = TRUE, toc = getOption("help.htmltoc", TRUE)), and we of course use httpd() for installed package help.

(Notably its not broken for "preview" R package help, i.e. for development version docs, since we control the Rd2HTML() call there and don't supply toc, see .ps.Rd2HTML()).


We have two options:

I think trying to use R-nav.css is probably a mistake, the TOC won't get us much, and is supposed to be hidden on narrow screens anyways. Since the Help pane is usually narrow, it would pretty much always be hidden.

So instead the best option is to just turn it off on load.


I have confirmed locally that this fixes the mangled help issue.

@DavisVaughan DavisVaughan requested a review from lionel- June 30, 2026 17:57
@DavisVaughan DavisVaughan merged commit 670a494 into main Jul 2, 2026
17 checks passed
@DavisVaughan DavisVaughan deleted the fix/help-mangling-4-6 branch July 2, 2026 19:23
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants