summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_text.ml
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
commit3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch)
treef5aa13505824d708414ece1f00219b811315c44a /ocamldoc/odoc_text.ml
parent30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff)
downloadocaml-gcaml3090.tar.gz
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_text.ml')
-rw-r--r--ocamldoc/odoc_text.ml25
1 files changed, 14 insertions, 11 deletions
diff --git a/ocamldoc/odoc_text.ml b/ocamldoc/odoc_text.ml
index 85578098b7..656321326d 100644
--- a/ocamldoc/odoc_text.ml
+++ b/ocamldoc/odoc_text.ml
@@ -25,8 +25,8 @@ module Texter =
Odoc_text_parser.main Odoc_text_lexer.main lexbuf
with
_ ->
- raise (Text_syntax (!Odoc_text_lexer.line_number,
- !Odoc_text_lexer.char_number,
+ raise (Text_syntax (!Odoc_text_lexer.line_number,
+ !Odoc_text_lexer.char_number,
s)
)
@@ -59,7 +59,7 @@ module Texter =
escape_n s '[' (open_brackets - close_brackets)
else
if close_brackets > open_brackets then
- escape_n s ']' (close_brackets - open_brackets)
+ escape_n s ']' (close_brackets - open_brackets)
else
s
@@ -98,16 +98,16 @@ module Texter =
| Right t -> p b "{R " ; p_text b t ; p b "}"
| List l -> p b "{ul\n"; p_list b l; p b "}"
| Enum l -> p b "{ol\n"; p_list b l; p b "}"
- | Newline -> p b "\n"
+ | Newline -> p b "\n"
| Block t -> p_text b t
| Title (n, l_opt, t) ->
- p b "{%d%s "
+ p b "{%d%s "
n
(match l_opt with
None -> ""
| Some s -> ":"^s
);
- p_text b t ;
+ p_text b t ;
p b "}"
| Latex s -> p b "{%% %s%%}" s
| Link (s,t) ->
@@ -130,21 +130,24 @@ module Texter =
| RK_method -> "method"
| RK_section _ -> "section"
in
- p b "{!%s:%s}" sk s
+ p b "{!%s:%s}" sk s
)
| Superscript t -> p b "{^" ; p_text b t ; p b "}"
| Subscript t -> p b "{_" ; p_text b t ; p b "}"
- | Module_list l ->
+ | Module_list l ->
p b "{!modules:";
List.iter (fun s -> p b " %s" s) l;
p b "}"
| Index_list ->
p b "{!indexlist}"
-
+ | Custom (s,t) ->
+ p b "{%s " s;
+ p_text b t;
+ p b "}"
+
let string_of_text s =
let b = Buffer.create 256 in
p_text b s;
Buffer.contents b
-
+
end
-