Closed moodymudskipper closed 3 years ago
It works fine for "normal" use, but some weirdness happens comments are found in a call, for instance :
test <- function(){
# a
identity({
# b
1
})
}
flow::flow_view(test, prefix = "#")
And this will fail
test <- function(){
# a
identity(
# b
1
)
}
flow::flow_view(test, prefix = "#")
#> Error in str2lang(src): <text>:5:5: unexpected numeric constant
#> 4: `#`("# b")
#> 5: 1
#> ^
Thus the feature is not really broken, it's just a wrong use of header comments, but we should either have an explicit error, or just ignore the improper header comments, I prefer the latter.
The latter case's ultimate test case is :
test <- function(){
# a
c(
# b
# c
1,
# d
# e
2
# f
# g
,3
# h
# i
)
}
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
looks like it's broken.
Should work with prefix = "#", prefix = "##", prefix = "#]"