Skip to content

Commit

Permalink
\n*\\s* does not make sense because \n is contained in \\s
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Oct 25, 2012
1 parent daf37e1 commit 5e38085
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/pattern.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ all_patterns = list(
inline.comment = '^\\s*%.*',
ref.chunk = '^\\s*<<(.*)>>\\s*$',
global.options = '\\\\SweaveOpts\\{([^}]*)\\}',
header.begin = '\n*\\s*\\\\documentclass[^}]+\\}',
document.begin = '\n*\\s*\\\\begin\\{document\\}',
header.begin = '\\s*\\\\documentclass[^}]+\\}',
document.begin = '\\s*\\\\begin\\{document\\}',
ref.label = '^## @knitr (.*)$'),

`brew` = list(inline.code = '<%[=]{0,1}\\s+([^%]*)\\s+[-]*%>'),
Expand All @@ -25,16 +25,16 @@ all_patterns = list(
inline.comment = '^\\s*%.*',
global.options = '%+\\s*roptions\\s*([^\n]*)',
inline.code = '\\\\rinline\\{([^}]*)\\}',
header.begin = '\n*\\s*\\\\documentclass[^}]+\\}',
document.begin = '\n*\\s*\\\\begin\\{document\\}',
header.begin = '\\s*\\\\documentclass[^}]+\\}',
document.begin = '\\s*\\\\begin\\{document\\}',
ref.label = '^## @knitr (.*)$'),

`html` = list(chunk.begin = '^\\s*<!--\\s*begin.rcode\\s*(.*)',
chunk.end = '^\\s*end.rcode\\s*-->',
ref.chunk = '^\\s*<<(.*)>>\\s*$',
inline.code = '<!--\\s*rinline\\s*([^>]*)\\s*-->',
global.options = '<!--\\s*roptions\\s*([^>]*)\\s*-->',
header.begin = '\n*\\s*<head>',
header.begin = '\\s*<head>',
ref.label = '^## @knitr (.*)$'),

`md` = list(chunk.begin = '^\\s*`{3,}\\s*\\{r(.*)\\}\\s*$',
Expand Down

0 comments on commit 5e38085

Please sign in to comment.