Skip to content

Commit

Permalink
see if this could avoid the character encoding warning in R CMD check…
Browse files Browse the repository at this point in the history
… (amend 51d17a6)
  • Loading branch information
yihui committed Sep 6, 2022
1 parent 4940521 commit 6bfffe9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/parser.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,12 @@ comment_chars = list(
`* ;` = c('sas'),
`--` = c('haskell', 'lua', 'mysql', 'psql', 'sql'),
`!` = c('fortran', 'fortran95'),
'\u235D' = c('apl'),
`*` = c('stata')
)
# reshape it using the language name as the index, i.e., from list(char = lang)
# to list(lang = char)
comment_chars = local({
res = list()
res = list(apl = '\u235D')
for (i in names(comment_chars)) {
chars = comment_chars[[i]]
res = c(res, setNames(rep(list(strsplit(i, ' ')[[1]]), length(chars)), chars))
Expand Down

0 comments on commit 6bfffe9

Please sign in to comment.