How to stop the Visual markdown editor to remove link references at the bottom of the file.

Hi community!

I have a question concerning the visual markdown editor.
I am writing a document, where I need the same link (including a lot of parameters) on several places in the document.

So, my idea was to use referenced links at the bottom of the document as described in the Markdown Quick Reference in RStudio. This works if I stay in the source editor, but when switching to the visual editor, the editor replaces the reference with the full link in the source file. In the following example I just took the standard text when creating a new Rmd File, removed all code chunks, and replaced the link to RMarkdown with the referenced version:

title: "TestIt"
author: "R. Ehret"
date: "`r Sys.Date()`"
    keep_md: yes

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see [RMarkdown].

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: 
check [RMarkdown]

## Including Plots

You can also embed plots, for example:

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
[RMarkdown] - This is the 2nd usage of the link defined at the end of this file 

[RMarkdown]: <> "R Markdown page"

If you now switch to the visual editor, the references RMarkdown will be replaced with full link. ... and I can't re-use the link again.

Is there any way to turn of this behavior off the visual editor? ...or am I doing something wrong?

Best regards, Ralf


This seems indeed like a bug in the visual editor. I would say to wait a few days and see if someone else replies here, but otherwise you might consider opening an issue on the RStudio GitHub page.

Kind regards,

Ok, thanks!
I will do so,

I created an issue: Visual Editor for markdown removes link references at the bottom of the file · Issue #12750 · rstudio/rstudio · GitHub

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.