Skip to content

Commit e4057a7

Browse files
committed
an option to disable rich documentation
it is needed for editor with less fancy markdown renderer
1 parent 041bae0 commit e4057a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/workspace.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ Workspace <- R6::R6Class("Workspace",
154154
} else {
155155
result <- NULL
156156

157-
if (requireNamespace("rmarkdown", quietly = TRUE) &&
158-
rmarkdown::pandoc_available()) {
157+
if (isTRUE(getOption("languageserver.rich_documentation", TRUE)) &&
158+
requireNamespace("rmarkdown", quietly = TRUE) &&
159+
rmarkdown::pandoc_available()) {
159160
html <- enc2utf8(repr::repr_html(hfile))
160161
# Make header look prettier:
161162
pattern <- "<table.*?<td>(.*?)\\s*{(.*?)}<\\/td>.*?<\\/table>\\n*<h2>\\s*(.*?)\\s*<\\/h2>"

0 commit comments

Comments
 (0)