Skip to content

Commit 8606b5c

Browse files
committed
Allow 'R' to come immediately after '***' for defining embedded R code chunks in sourceCpp.
Merge branch 'feature/embedded-r-spacing'
2 parents 150be95 + 674bccd commit 8606b5c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2015-02-13 JJ Allaire <[email protected]>
2+
3+
* src/attributes.cpp: Allow 'R' to come immediately after '***'
4+
for defining embedded R code chunks in sourceCpp
5+
16
2015-02-12 JJ Allaire <[email protected]>
27

38
* DESCRIPTION: bump version

inst/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
\item Support addition of the \code{rng} parameter in \code{Rcpp::export}
2626
to suppress the otherwise automatic inclusion of \code{RNGScope} in generated code.
2727
\item Version 3.2 of the Rtools is now correctly detected as well.
28+
\item Allow 'R' to come immediately after '***' for defining embedded R
29+
code chunks in sourceCpp.
2830
}
2931
}
3032
}

src/attributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ namespace attributes {
697697
Rcpp::CharacterVector linesVector,
698698
const std::deque<std::string>& lines) {
699699
Rcpp::List matches = regexMatches(linesVector,
700-
"^\\s*/\\*{3,}\\s+[Rr]\\s*$");
700+
"^\\s*/\\*{3,}\\s*[Rr]\\s*$");
701701
bool withinRBlock = false;
702702
CommentState commentState;
703703
std::vector<std::string> embeddedR;

0 commit comments

Comments
 (0)