How to disable symbol conversion in RStudio Visual Markdown mode (to prevent damage of content)

I use R Markdown editor in RStudio (1.4.1717). I created .Rmd file with contents like this:

The closing quote must not be changed „here“.

Interval -2–-1: the combination of – (en dash) and hyphen must not be changed into ---

enter image description here

After switching to Visual Markdown and back to regular markdown editor, the contents were changed into:

The closing quote must not be changed „here".

Interval -2---1: the combination of -- (en dash) and hyphen must not be changed into ---

enter image description here

The same happens when I save the Rmd file in the Visual Markdown editor.

  • Here was changed into ". In English, it would be OK, but in my language, these are two different symbols. The text got distorted in an unwanted way.
  • Next, interval "from minus two to minus one" was converted into "from minus two to (plus) one". This changed the meaning of the content.

Sometimes I copy-paste pieces of text into R Markdown file, sometimes I want to use Visual mode on old Rmd files in which non-Englis language is used. If these conversions happen and the user does not notice them on time, the damage can irreversible.

Question: How can these unwanted symbol conversions be reliably disabled in RStudio?

Thanks for reporting this. I've got an issue logged here: visual editor quote and en-dash symbol conversion creates unintended source markdown · Issue #9680 · rstudio/rstudio · GitHub

We are the very end of development for the current release but I will definitely try to resolve this in the subsequent release (track that bug for updates).

1 Like