Skip to content

Commit

Permalink
allow spaces in the chunk header; closes #606
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Sep 20, 2013
1 parent 6ee2c36 commit 06b229a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

- when a message/warning/error contains line breaks, they are preserved and the message will not be re-wrapped (#602, thanks, Tyler Rinker)

- `read_chunk()` tolerates white spaces in the end of the chunk headers now (suggested by John Maindonald, #606)

# CHANGES IN knitr VERSION 1.4

## NOTE
Expand Down
2 changes: 1 addition & 1 deletion R/pattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ all_patterns = list(
inline.code = '[+]r +([^+\n]+)\\s*[+]', inline.comment = '^//.*')
)

.sep.label = '^#+\\s*(@knitr|----+)(.*?)-*$' # pattern for code chunks in an R script
.sep.label = '^#+\\s*(@knitr|----+)(.*?)-*\\s*$' # pattern for code chunks in an R script

## initial pattern list
.pat.init = list(
Expand Down

0 comments on commit 06b229a

Please sign in to comment.