Skip to content

Commit

Permalink
Add native pipe to list of known R operators (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Nov 8, 2021
1 parent 1b15a51 commit 1bc07c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ learnr (development version)
* `options()` and environment variables are now reset after rendering exercises so changes made by user input or checking code cannot affect other exercises. ([#542](https://github.com/rstudio/learnr/pull/542))
* Exercise checking is now conducted in the same temporary directory where exercises are evaluated. ([#544](https://github.com/rstudio/learnr/pull/544/))
* User submissions for R code exercises are now checked for parsing errors prior to any other checks. If the submitted code is unparsable, a friendly error feedback message is returned and no further evaluation or checking is performed. ([#547](https://github.com/rstudio/learnr/pull/547))
* The native R pipe, introduced in R 4.1, is now recognized as a valid R operator in the interactive exercise editor. (thanks @ijlyttle, [#595](https://github.com/rstudio/learnr/pull/595))
* Parse errors from user code that fails to parse can now be inspected by the error checker, but errors in exercise setup chunks cannot. Instead, global setup and setup chunk errors are raised as internal errors with a user-facing warning. In general, internal errors are now handled more consistently. ([#596](https://github.com/rstudio/learnr/pull/596))
* Commented code within an exercise will no longer be auto completed. ([#604](https://github.com/rstudio/learnr/pull/604))

Expand Down
2 changes: 1 addition & 1 deletion inst/lib/tutorial/tutorial-diagnostics.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var TutorialDiagnostics = function(tutorial) {

rules["start"].unshift({
token : "keyword.operator",
regex : ":::|::|:=|%%|>=|<=|==|!=|\\->|<\\-|<<\\-|\\|\\||&&|=|\\+|\\-|\\*\\*?|/|\\^|>|<|!|&|\\||~|\\$|:|@|\\?",
regex : ":::|::|:=|%%|>=|<=|==|!=|\\|>|\\->|<\\-|<<\\-|\\|\\||&&|=|\\+|\\-|\\*\\*?|/|\\^|>|<|!|&|\\||~|\\$|:|@|\\?",
merge : false,
next : "start"
});
Expand Down

0 comments on commit 1bc07c5

Please sign in to comment.