diff options
author | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-07-30 08:19:10 +0200 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-07-30 08:19:10 +0200 |
commit | 070139d3a82ea23e4d050dd5ccebe3f17047cc62 (patch) | |
tree | 9af248fe3fcac52f022331d4b0751936b41f8927 /tools/coq_tex.ml | |
parent | 52940b19a7f47fa5022d75c5679785ac90aaa0dc (diff) |
Fix broken regexp.
Characters do not need to be escaped in character ranges. It just had the
effect of matching backslashes four times.
Diffstat (limited to 'tools/coq_tex.ml')
-rw-r--r-- | tools/coq_tex.ml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/coq_tex.ml b/tools/coq_tex.ml index 26a9715ef..8218f84f1 100644 --- a/tools/coq_tex.ml +++ b/tools/coq_tex.ml @@ -64,8 +64,7 @@ let extract texfile inputv = * TeX file [texfile]. The result goes in file [result]. *) let tex_escaped s = - let dollar = "\\$" and backslash = "\\\\" and expon = "\\^" in - let delims = Str.regexp ("[_{}&%#" ^ dollar ^ backslash ^ expon ^"~ <>'`]") in + let delims = Str.regexp "[_{}&%#$\\^~ <>'`]" in let adapt_delim = function | "_" | "{" | "}" | "&" | "%" | "#" | "$" as c -> "\\"^c | "\\" -> "{\\char'134}" |