summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxence Guesdon <maxence.guesdon@inria.fr>2010-06-16 11:38:22 +0000
committerMaxence Guesdon <maxence.guesdon@inria.fr>2010-06-16 11:38:22 +0000
commitaab12e6d5c8804842114ebe9ecade23e334b27d8 (patch)
treec8d04f6a7b445683ec996657028f31917b1d8eef
parenta78ac5b925cdc130e918d82a44daf0aa0faffa6e (diff)
downloadocaml-aab12e6d5c8804842114ebe9ecade23e334b27d8.tar.gz
ocamldoc fix: ermove the starting '{' from custom text tag
git-svn-id: http://caml.inria.fr/svn/ocaml/version/3.12@10584 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--ocamldoc/Makefile2
-rw-r--r--ocamldoc/odoc_text_lexer.mll4
2 files changed, 4 insertions, 2 deletions
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index a9ce895918..7ed30908df 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -282,7 +282,7 @@ installopt_really:
###########
test: dummy
$(MKDIR) $@
- $(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/ocamldoc.odoc test.txt test2.txt odoc*.ml odoc*.mli -v
+ $(OCAMLDOC_RUN) -html -colorize-code -sort -d $@ $(INCLUDES) -dump $@/ocamldoc.odoc odoc*.ml odoc*.mli -v
test_stdlib: dummy
$(MKDIR) $@
diff --git a/ocamldoc/odoc_text_lexer.mll b/ocamldoc/odoc_text_lexer.mll
index 9108c5e606..f229f08a66 100644
--- a/ocamldoc/odoc_text_lexer.mll
+++ b/ocamldoc/odoc_text_lexer.mll
@@ -777,7 +777,9 @@ rule main = parse
Char (Lexing.lexeme lexbuf)
else
let s = Lexing.lexeme lexbuf in
- let tag = Odoc_misc.no_blanks s in
+ let len = String.length s in
+ (* remove this starting '{' *)
+ let tag = Odoc_misc.no_blanks (String.sub s 1 (len - 1)) in
CUSTOM tag
}