Skip to content

Commit c816d1c

Browse files
Merge pull request #596 from lorenzwalthert/r-1.3.1
- Release styler v1.3.1 (#596).
2 parents 6b1dbfa + 9cb2857 commit c816d1c

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: styler
33
Title: Non-Invasive Pretty Printing of R Code
4-
Version: 1.3.9000
4+
Version: 1.3.1
55
Authors@R:
66
c(person(given = "Kirill",
77
family = "Müller",

NEWS.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# styler 1.3.1
2+
3+
Emergency release. In case multiple expressions are on one line and only
4+
some of them are cached, styler can remove code. To reach this state,
5+
some of the expressions must have been styled previously alone and the cache
6+
must be active. Example:
7+
8+
```
9+
library(styler)
10+
cache_activate()
11+
#> Using cache 1.3.0 at ~/.Rcache/styler/1.3.0.
12+
style_text("1")
13+
#> 1
14+
style_text("1 # comment")
15+
#> # comment
16+
```
17+
18+
This is obviously detrimental. We have added additional tests and fixed the
19+
problem (#593, #595), but we want repeat the warning from `?style_file` that all
20+
style APIs apart from `style_text()` overwrite code and that styler can only
21+
check the AST remains valid with `scope < "tokens"`. So use this if you are
22+
conservative. Or deactivate the cache with `deactivate_cache()` until it has
23+
fully matured.
24+
25+
We thank the people who have contributed to this release:
26+
27+
[&#x0040;ellessenne](https://github.com/ellessenne) and
28+
[&#x0040;renkun-ken](https://github.com/renkun-ken).
29+
130
# styler 1.3.0
231

332
## Breaking changes

0 commit comments

Comments
 (0)