Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less-than operator and HTML #3804

Closed
vicuna opened this issue Oct 6, 2005 · 1 comment
Closed

less-than operator and HTML #3804

vicuna opened this issue Oct 6, 2005 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 6, 2005

Original bug ID: 3804
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Ian Zimmerman
Version: 3.08.4
OS: Debian etch
Submission from: cpe000f66de4222-cm00080d93c484.cpe.net.cable.rogers.com (69.194.228.44)

I want to use <? as an infix operator. Unfortunately, in its code mode,
ocamldoc
puts this literally into the HTML output, and the browser (correctly) treats it
as the beginning of a Processing Instruction.

I think ocamldoc should use the usual HTML/SGML entity coding to represent <,
ie.
<

@vicuna
Copy link
Author

vicuna commented Oct 6, 2005

Comment author: administrator

On Thu, 6 Oct 2005 07:15:19 +0200 (MET DST)
itz@buug.org wrote:

Full_Name: Ian Zimmerman
Version: 3.08.4
OS: Debian etch
Submission from: cpe000f66de4222-cm00080d93c484.cpe.net.cable.rogers.com
(69.194.228.44)

I want to use <? as an infix operator. Unfortunately, in its code mode,
ocamldoc
puts this literally into the HTML output, and the browser (correctly) treats
it
as the beginning of a Processing Instruction.
I think ocamldoc should use the usual HTML/SGML entity coding to represent <,
ie.
<

Hello,

Indeed, some escaping was missing, and also in the values index page.
This is fixed in the current CVS (available within some hours).
Here is a patch which fixes the problem (include another fix with the prefix
of index files in the HTML generator).

Thanks for the report.

Regards,

Maxence Guesdon


Caml-devel mailing list
Caml-devel@yquem.inria.fr
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-devel


Index: odoc_html.ml

RCS file: /net/yquem/devel/caml/repository/csl/ocamldoc/odoc_html.ml,v
retrieving revision 1.52.4.6
retrieving revision 1.52.4.7
diff -u -r1.52.4.6 -r1.52.4.7
--- odoc_html.ml 15 Sep 2005 12:38:06 -0000 1.52.4.6
+++ odoc_html.ml 6 Oct 2005 07:01:25 -0000 1.52.4.7
@@ -9,7 +9,7 @@
(* *)
(***********************************************************************)

-(* $Id: odoc_html.ml,v 1.52.4.6 2005/09/15 12:38:06 guesdon Exp $ )
+(
$Id: odoc_html.ml,v 1.52.4.7 2005/10/06 07:01:25 guesdon Exp $ *)

(** Generation of html documentation.*)

@@ -780,34 +780,35 @@
when printing a module type. *)
val mutable known_modules_names = StringSet.empty

  • method index_prefix =
  •  if !Odoc_args.out_file = Odoc_messages.default_out_file then
    
  • "index"
  •  else
    
  • Filename.basename !Odoc_args.out_file
  • (** The main file. *)
    method index =
  •  let p =
    
  • if !Odoc_args.out_file = Odoc_messages.default_out_file then
  • "index"
    
  • else
  • Filename.basename !Odoc_args.out_file
    
  •  in
    
  •  let p = self#index_prefix in
     Printf.sprintf "%s.html" p
    

    (** The file for the index of values. *)

  • method index_values = Printf.sprintf "%s_values.html" (Filename.basename !Odoc_args.out_file)
  • method index_values = Printf.sprintf "%s_values.html" self#index_prefix
    (** The file for the index of types. *)
  • method index_types = Printf.sprintf "%s_types.html" (Filename.basename !Odoc_args.out_file)
  • method index_types = Printf.sprintf "%s_types.html" self#index_prefix
    (** The file for the index of exceptions. *)
  • method index_exceptions = Printf.sprintf "%s_exceptions.html" (Filename.basename !Odoc_args.out_file)
  • method index_exceptions = Printf.sprintf "%s_exceptions.html" self#index_prefix
    (** The file for the index of attributes. *)
  • method index_attributes = Printf.sprintf "%s_attributes.html" (Filename.basename !Odoc_args.out_file)
  • method index_attributes = Printf.sprintf "%s_attributes.html" self#index_prefix
    (** The file for the index of methods. *)
  • method index_methods = Printf.sprintf "%s_methods.html" (Filename.basename !Odoc_args.out_file)
  • method index_methods = Printf.sprintf "%s_methods.html" self#index_prefix
    (** The file for the index of classes. *)
  • method index_classes = Printf.sprintf "%s_classes.html" (Filename.basename !Odoc_args.out_file)
  • method index_classes = Printf.sprintf "%s_classes.html" self#index_prefix
    (** The file for the index of class types. *)
  • method index_class_types = Printf.sprintf "%s_class_types.html" (Filename.basename !Odoc_args.out_file)
  • method index_class_types = Printf.sprintf "%s_class_types.html" self#index_prefix
    (** The file for the index of modules. *)
  • method index_modules = Printf.sprintf "%s_modules.html" (Filename.basename !Odoc_args.out_file)
  • method index_modules = Printf.sprintf "%s_modules.html" self#index_prefix
    (** The file for the index of module types. *)
  • method index_module_types = Printf.sprintf "%s_module_types.html" (Filename.basename !Odoc_args.out_file)
  • method index_module_types = Printf.sprintf "%s_module_types.html" self#index_prefix

    (** The list of attributes. Filled in the [generate] method. *)
    @@ -1271,11 +1272,11 @@
    bp b "<a name="%s">" (Naming.value_target v);
    (
    match v.val_code with

  •     None -> bs b (Name.simple v.val_name)
    
  •     None -> bs b (self#escape (Name.simple v.val_name))
      | Some c ->
          let file = Naming.file_code_value_complete_target v in
          self#output_code v.val_name (Filename.concat !Args.target_dir file) c;
    
  •       bp b "<a href=\"%s\">%s</a>" file (Name.simple v.val_name)
    
  •       bp b "<a href=\"%s\">%s</a>" file (self#escape (Name.simple v.val_name))
     );
     bs b " : ";
     self#html_of_type_expr b (Name.father v.val_name) v.val_type;
    

@@ -1977,7 +1978,7 @@
let f_ele e =
let simple_name = Name.simple (name e) in
let father_name = Name.father (name e) in

  •      bp b "<tr><td><a href=\"%s\">%s</a> " (target e) simple_name;
    
  •      bp b "<tr><td><a href=\"%s\">%s</a> " (target e) (self#escape simple_name);
         if simple_name <> father_name && father_name <> "" then
           bp b "[<a href=\"%s\">%s</a>]" (fst (Naming.html_files father_name)) father_name;
         bs b "</td>\n<td>";
    

@@ -2461,4 +2462,4 @@

-(* eof $Id: odoc_html.ml,v 1.52.4.6 2005/09/15 12:38:06 guesdon Exp $ )
+(
eof $Id: odoc_html.ml,v 1.52.4.7 2005/10/06 07:01:25 guesdon Exp $ *)


@vicuna vicuna closed this as completed Oct 6, 2005
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant