-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix newline removal after options by parsing a table instead of a string * Add test * Add release note and bump extension * Simplify logic. * Add more test cases... * Improve number example
- Loading branch information
Showing
5 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
title: "Test: Space Removal after Options" | ||
format: html | ||
engine: knitr | ||
filters: | ||
- webr | ||
--- | ||
|
||
Check that the editor contents avoids retaining spaces after the options. | ||
|
||
|
||
## Option with a Single Space | ||
|
||
```{webr-r} | ||
#| autorun: true | ||
print("test") | ||
1 + 1 | ||
``` | ||
|
||
## Multiple Options with a Single Space | ||
|
||
```{webr-r} | ||
#| read-only: true | ||
#| editor-code-line-numbers: 1,3-5,7 | ||
# This is a comment | ||
1 + 1 | ||
2 + 2 | ||
3 + 3 | ||
# This is another comment | ||
``` | ||
|
||
## Multiple Spaces | ||
|
||
```{webr-r} | ||
#| autorun: true | ||
print("test") | ||
1 + 1 | ||
``` | ||
|
||
|
||
## No Space | ||
|
||
```{webr-r} | ||
#| autorun: true | ||
print("test") | ||
1 + 1 | ||
``` | ||
|
||
|
||
## No Options | ||
|
||
```{webr-r} | ||
fit <- lm(mpg ~ vs, data = mtcars) | ||
summary(fit) | ||
``` |