In Markdown, we often use a blank line to separate elements such as paragraphs. To break a line without introducing a new paragraph, you have to use two trailing spaces. Sometimes you may want to break the lines many times, especially when you write or quote poems or lyrics. Adding two spaces after each line manually is a tedious task. The function can do this task automatically, e.g.,
If you use the RStudio IDE and have installed the package blogdown (), you can select the text in which you want to preserve the line breaks, and click the RStudio addin “Quote Poem” in the drop-down menu “Addins” on the toolbar. For example, the text below (in a fenced code block) does not contain trailing spaces:
Like Barley Bending
Like barley bending
In low fields by the sea,
Like barley bending
And rising again,
So would I, unbroken,
So would I softly,
Day long, night long,
Change my sorrow
Into song.
———. 2020b. Blogdown: Create Blogs and Websites with r Markdown. https://github.com/rstudio/blogdown.