rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
895 stars 127 forks source link

Allow find_chrome() to return all the compatible browsers #227

Open RLesur opened 3 years ago

RLesur commented 3 years ago

From @cderv, in https://github.com/rstudio/pagedown/pull/225#pullrequestreview-639068646:

  • do we want to allow a choice ? We could have something like
find_chrome(which = NULL) # default - use first one found - Chrome then MSEdge
find_chrome(which = "all") # returns all paths found - useful to check
find_chrome(which = "chrome") # returns Chrome
find_chrome(which = "msedge") # returns MSEdge

It is not useful for pagedown directly and we could keep the idea if there is a need. I though of that mainly because

  • I tried find_chrome("all") because we support it in blogdown::find_hugo("all")
  • I have chrome AND msedge and I can't really choose which one to use with find_chrome() - it will always use Google Chrome. I need to set explicitly the env var to test EDGE.

So I would use it :)

@RLesur I could make the change in another PR if you think it would be interesting.

cderv commented 3 years ago

Then I understand this is interesting 😉 I'll do it.

RLesur commented 3 years ago

Of course! Since I've only a single compatible browser on each of my computers, I had never had this idea but I agree this will be a great improvement in order to test chrome_print().