Skip to content

Commit

Permalink
the header data may contain '/', e.g., book:dir/foo.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Aug 6, 2024
1 parent c227c86 commit 9d7eaf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/preview.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ roam = function(dir = '.', live = TRUE, ...) in_dir(dir, {
# we keep POSTing to the page assets' URLs, and if an asset file has been
# modified, we return a response telling the browser to update it
type = if (length(headers)) xfun::grep_sub(
'.*\nlitedown-data: ([:[:alnum:]]+).*', '\\1', rawToChar(headers)
'.*\nlitedown-data: ([^[:space:]]+).*', '\\1', rawToChar(headers)
)
if (length(type) != 1) type = ''
# we may need to check rawToChar(headers) to decide what to do for the
Expand Down

0 comments on commit 9d7eaf9

Please sign in to comment.