rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
165 stars 35 forks source link

Escape characters for showDialog and showPrompt #285

Open sxl634 opened 10 months ago

sxl634 commented 10 months ago

Escape characters such as "\n" work for showQuestion, but don't work for showDialog and showPrompt. When you use \n (or other similar escape characters), they just vanish from the message without their intended effect. But for some reason they work for showQuestion, so when I used \n in a showQuestion message, a new line was created. Can you allow escape characters to be used for the other 2 show functions?

Example code:

showDialog(title="test", message = "test \n test")
showPrompt(title="test", message = "test \n test")
showQuestion(title="test", message = "test \n test")
notPlancha commented 6 months ago

Want to add that this doesn't seem like an issue on older (<2023) versions, as it's using a different function to prompt (these prompts look self implemented), so It's probably that it's rstudio's fault here)