Reference section text has wrong line breaks

After looking into this more in details, this is related to Pandoc changes in 2.11.2 but it is rmarkdown related as some CSS is required.

Try this as a workaround

---
title: "Untitled"
date: "`r Sys.Date()`"
output: html_document
bibliography: packages.bib
csl: https://www.zotero.org/styles/vancouver-brackets-only-year-no-issue
---

# A header

```{css, echo = FALSE}
div.csl-bib-body { }
div.csl-entry {
  clear: both;
$if(csl-entry-spacing)$
  margin-bottom: $csl-entry-spacing$;
$endif$
}
.hanging div.csl-entry {
  margin-left:2em;
  text-indent:-2em;
}
div.csl-left-margin {
  min-width:2em;
  float:left;
}
div.csl-right-inline {
  margin-left:2em;
  padding-left:1em;
}
div.csl-indent {
  margin-left: 2em;
}
```


```{r setup, include=FALSE}
knitr::write_bib("knitr", "packages.bib")
```

See [@R-knitr]

# References

I'll open an issue in Rmarkdown. Thanks a lot for the report about this !

1 Like