Skip to content
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

fill() links to wrong topic #135

Closed
hadley opened this issue Apr 27, 2022 · 3 comments · Fixed by #147
Closed

fill() links to wrong topic #135

hadley opened this issue Apr 27, 2022 · 3 comments · Fixed by #147
Labels
bug an unexpected problem or unintended behavior
Milestone

Comments

@hadley
Copy link
Member

hadley commented Apr 27, 2022

downlit::highlight("
  library(tidyverse)
  fill()"
)
#> [1] "\n  <span class='kr'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='o'>(</span><span class='nv'><a href='https://tidyverse.tidyverse.org'>tidyverse</a></span><span class='o'>)</span>\n  <span class='nf'><a href='https://ggplot2.tidyverse.org/reference/aes_colour_fill_alpha.html'>fill</a></span><span class='o'>(</span><span class='o'>)</span>"

Created on 2022-04-27 by the reprex package (v2.0.1)

Should prefer function over floating topic

@hadley hadley added the bug an unexpected problem or unintended behavior label Jun 17, 2022
@hadley hadley added this to the 0.4.1 milestone Jun 17, 2022
@hadley
Copy link
Member Author

hadley commented Jun 18, 2022

Minimal reprex:

options(downlit.attached = c("ggplot2", "tidyr"))
downlit::href_topic("fill")
#> [1] "https://ggplot2.tidyverse.org/reference/aes_colour_fill_alpha.html"

Created on 2022-06-18 by the reprex package (v2.0.1)

@hadley
Copy link
Member Author

hadley commented Jun 21, 2022

I think we'll need either href_function() or href_topic(only_function = TRUE). But then how do we establish whether a topic is for a function or not? Maybe can just check package namespace for presence of function?

@hadley
Copy link
Member Author

hadley commented Jun 22, 2022

Better reprex:

options(downlit.attached = c("ggplot2", "tidyr"))

downlit::highlight("fill()")
#> [1] "<span class='nf'><a href='https://ggplot2.tidyverse.org/reference/aes_colour_fill_alpha.html'>fill</a></span><span class='o'>(</span><span class='o'>)</span>"
downlit:::href_expr(quote(fill()))
#> [1] "https://ggplot2.tidyverse.org/reference/aes_colour_fill_alpha.html"

Created on 2022-06-22 by the reprex package (v2.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant