aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/coq_tex.ml
diff options
context:
space:
mode:
authorGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2015-07-30 08:19:10 +0200
committerGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2015-07-30 08:19:10 +0200
commit070139d3a82ea23e4d050dd5ccebe3f17047cc62 (patch)
tree9af248fe3fcac52f022331d4b0751936b41f8927 /tools/coq_tex.ml
parent52940b19a7f47fa5022d75c5679785ac90aaa0dc (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.ml3
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}"