Skip to content

Commit 80b87c2

Browse files
author
hornik
committed
Tweaks: in particular, allow choosind the LaTeX parser.
git-svn-id: https://svn.r-project.org/R/trunk@87980 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent b91721b commit 80b87c2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/library/utils/R/aspell.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,7 @@ function(ifile, encoding = "unknown", ...)
12621262
aspell_filter_LaTeX_worker(readLines(ifile, encoding = encoding),
12631263
...)
12641264
aspell_filter_LaTeX_worker <-
1265-
function(x, vrbs = c("verbatim", "verbatim*", "Sinput", "Soutput"),
1266-
cmds = NULL, envs = NULL)
1265+
function(x, cmds = NULL, envs = NULL, parser = tools::parseLatex, ...)
12671266
{
12681267
ranges <- list()
12691268
chrran <- function(e) getSrcref(e)[c(1L, 5L, 3L, 6L)]
@@ -1316,7 +1315,7 @@ function(x, vrbs = c("verbatim", "verbatim*", "Sinput", "Soutput"),
13161315
}
13171316
}
13181317

1319-
recurse(tools::parseLatex(x, verbatim = vrbs))
1318+
recurse(parser(x, ...))
13201319
blank_out_character_ranges(x, ranges)
13211320
}
13221321

0 commit comments

Comments
 (0)