Skip to content

Respect RdMacros#1266

Merged
ManuelHentschel merged 6 commits intoREditorSupport:masterfrom
ManuelHentschel:rdMacros
Nov 27, 2022
Merged

Respect RdMacros#1266
ManuelHentschel merged 6 commits intoREditorSupport:masterfrom
ManuelHentschel:rdMacros

Conversation

@ManuelHentschel
Copy link
Member

The help preview now respects Rd-macros, defined either in a local file or using the RdMacros entry in DESCRIPTION. To test, install e.g. the package RdPack, and create a package directory with:

  • ./man/macros/someMacroFile.Rd containing
    \newcommand{\testmacro}{This is a test!}
    
  • ./DESCRIPTION containing
    [...]
    RdMacros: RdPack
    
  • ./man/someHelpFile.Rd containing
    [...]
    \testmacro{}
    \insertAllCited{}
    

Previewing this help file should include the expanded macros, i.e. "This is a test!" and "There are no references for Rd macro \insertAllCites on this help page."

Furthermore, failing to convert an Rd file to HTML now shows a warning message.

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

@renkun-ken
Copy link
Member

One more thing, would you like to fix the lintr complain at https://github.com/REditorSupport/vscode-R/actions/runs/3558811159/jobs/5977742141?

@ManuelHentschel ManuelHentschel merged commit e906b20 into REditorSupport:master Nov 27, 2022
@ManuelHentschel ManuelHentschel deleted the rdMacros branch November 27, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants