Rstudio: Spell check does not fully check .Rmd files (bug)

Created on 11 Oct 2017  路  3Comments  路  Source: rstudio/rstudio

Take this example R markdown file:

---
title: "Title"
output: html_document
---

## H2 missssspelling

** Bold text missssspelling **
_ italisized text with two missssspellings _

Normal text with a final missssspelling.

```{r }
library(rmarkdown)
library(knitr)
.
.
.

Currently, Check Spelling only identifies spelling errors in the normal text of .Rmd files, and would only identify a single error in this document. Styled text in markdown files should be check as well.


P.S. This is my first time submitting to this repo and I appreciate your feedback and guidance.

bug reproducible verified

Most helpful comment

Is any work on this issue planned for the near future? I'm trying to transition my org to use RMD to reveal.js (away from PPT) briefings, but it is embarrassing when the resulting briefings have errors all over the headers, styled text, and 2nd level or deeper bullet points.

All 3 comments

This happens because of the way R Markdown documents are tokenized. Only tokens with the "text" type are spell-checked.

https://github.com/rstudio/rstudio/blob/master/src/gwt/src/org/rstudio/studio/client/common/filetypes/TextFileType.java#L481-L482

However, for syntax highlighting, we assign non-text token types to headers, etc. For example the bold text is constant.numeric:

image

whereas the correctly spellchecked text is just text.

Is any work on this issue planned for the near future? I'm trying to transition my org to use RMD to reveal.js (away from PPT) briefings, but it is embarrassing when the resulting briefings have errors all over the headers, styled text, and 2nd level or deeper bullet points.

I agree. The technical impact of this bug is negligible, but the social impact is HUGE! I'm nervous to share my code with colleagues if it's littered with silly errors. Right now I do a spellchecking pass in Atom, and I'm cringing even as I write that sentence.

Spellcheck is a crucial tool for social collaboration!

While I would love to see proper scaling on 4k displays, I would use proper spelling every day. 馃摑 鉂わ笍

Was this page helpful?
0 / 5 - 0 ratings